Tag | GridView Posts

I have just added a new videos section on GridViewGuy. Actually it is a new website www.videos.gridviewguy.com. Currently I have added few videos but I will be making additions every day. The website host couple of FREE Videos so check them out. Thanks and enjoy, powered by IMHO 1.3 ...
ASP.NET 2.0 has started picking up the momentum and alredy there are a large scale of companies using it for developing cutting edge web applications. While the features, enhancements have been very good, the decisive factor in web applications development is performance. ASP.NET 2.0 in general has a lot of performance enhancement feature starting from compilation model to ADO.NET 2.0 DataSets which is comparitively faster than its predecessor. Please check New DataSet Features in ADO.NET 2.0 for ...
In my opinion the last two versions of Visual WebGui including this one shows why it's a killer environment. When building super complex apps comes to dragging three components to a design surface and writing a few lines of code to bind them together this sounds like a RAD product. But Visual WebGui does not assume what you want to do. It just takes care of the “how” and leaves you only with the “what”. You see I have recently learned that modeless dialogs in IE are working ...
I have a user control with GridView and ObjectDataSource. I also have a button, that should update database and I wanted to refresh GridView in the same click callback. And it's easy to do- call ObjectDataSource.Select and then GridView.DataBind: Protected Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click ‘method to update database is omitted for simplicity Me.ObjectDataSource1.Select() Me.GridView1.DataBind() End Sub Update: As I was adviced by Bob Riley, ...
I've started to work with ObjectDataSource and had a question about event sequence for it. I didn't find specific documentation and added event handlers with DebugHelper.TracedLine calls (you can use just simple Debug.WriteLiine). The result was quite logical:Page_Load (IsPostBack =False)ObjectDataSource1_Lo... user clicked on Select buttonPage_Load (IsPostBack ...
I have just published a new article on www.gridviewguy.com which talks about Caching Dependencies. The article includes a download sample code in C# in which I have showed the Caching Dependencies on Cached items, database and files. You can view the article at the following link: http://gridviewguy.com/Arti... powered by IMHO 1.3 ...
Resume – Senior, Hands-On, .NET, C#, VB, ASP, XML, SQL, SharePoint, Crystal, Reporting Services Developer, Team Leader, Hard-Core Coder Rodney Vinyard, 29 Windermere Road, Montclair, NJ 07043 rodney.vinyard@gmail.com · Seeking North NJ/Manhattan .NET/SQL developer job. · Hands-on .NET, C#, VB, SQL, ASP, XML, XSLT, Reporting Services, Crystal. · 30 years of productive, software engineering experience. · Inventive, focused, hands-on software designer, engineer & coder. · Effective leader, writer ...
Oh yeah .... Scott Hanselman beat me to the punch, but Mission “Build Biggest Book Possible” has been completed! Our Professional ASP.NET 2.0 book from Wrox just had to get bigger with all the cool stuff we wanted to add. 300 new pages! So big, that we could only offer the book in hardback because they don't make bindings big enough to handle all the pages (~1,700). Its called, Professional ASP.NET 2.0 Special Edition (because it is just so special). :) And as was stated by others: Here's ...
The next release of Visual WebGui will include some exciting new features that considering the amount of developers that requested these features will defiantly be some thing to look for. We have added data binding support enabling binding of collections and datasets to list boxes and combo boxes and binding controls to a currency manager that provides synchronization between controls just as WinForms does. All the features of the data binding mechanism are available more and more controls will support ...
Last year at the Microsoft BPI Conference in Seattle over a few beers Scott Alan (a Microsoft integration technology specialist) shared with me his idea about using ASP.net 2.0 Web Parts to present BAM data. The idea was to give managers a more precise, flexible and easy to use interface into their business processes, they could essentially go to one dashboard and get a historical and current view of how various areas of their business unit or organisation were doing. I’ve searched the blogosphere ...
Few days ago I blogged about how you can create a running total with the TextBoxes inside the GridView control. The article about the running total can also be found on the GridViewGuy website. One of the readers pointed out that the sample code would not work if the user will edit the amount. This was offcourse a big problem if the users make a mistake and try to edit it. I worked on the problem and found a simple solution. The solution to this problem is to iterate through the textboxes and calculate ...
I have recently published an article on GridViewGuy on how to populate the TreeView control using the database. The article demonstrate the solution using entity classes. Here is a small code snippet from the article. // This method is used to populate the TreeView Control private void PopulateTreeViewControl(Lis... categoryList) { TreeNode parentNode = null; foreach (Category category in categoryList) { parentNode = new TreeNode(category.CategoryN... category.CategoryID.ToStrin... ...
So I'm signed up to receive ".NET Insight", the newsletter from the guys over at FTPOnline, and I get a recent one with “Generate Data-Based Web Sites With Blinq” as a news title. My first thought is “greeeat... another blahLINQ technology to add to all the xLINQ confusion....”. Hesitantly, I click the link and begin to read about BLINQ... blah, blah, blah... “Blinq.exe is a deceptively simple command-line tool—similar to SqlMetal.exe for LINQ to SQL—that ...
Someone asked on ASP.NET forums that how you can display a running total inside the GridView control. I thought it would be a exercise to implement a simple application that keeps a running total. You can implement the running total in different ways but I think the best way is that when you enter the number in the TextBox it should be added to the total. In this way you don't need to do any postback and hence you don't need to wait. I have implemented the running total application which can be viewed ...
Scott Guthrie has posted a good link with 15 ASP.NET Data Tutorials that were created by Scott Mitchell. These tutorials found here, cover the following: Introduction Articles Creating a Data Access Layer using Typed DataSets Creating a Business Logic Layer Using Master Pages and Site Navigation for Consistent Look and Feel of the Data Samples Basic ASP.NET Data Reporting Displaying Data with the ObjectDataSource Using ObjectDataSource Declarative Parmeters Programmatically Setting ObjectDataSource ...
I may be late to look at these articles but better late than never. ASP.NET site has a nice list of tutorials on working with ADO.NET in ASP.NET 2.0. The list is Introduction Creating a Data Access Layer Creating a Business Logic Layer Master Pages and Site Navigation Basic Reporting Displaying Data With the ObjectDataSource Declarative Parameters Programmatically Setting the ObjectDataSource's Parameter Values Master/Detail Master/Detail Filtering With a DropDownList Master/Detail Filtering With ...
I am not sure if I have already posted this entry but here it is again. Mr Brian Jones posted this tip on the GridViewGuy website. If you try to export a very large dataset to excel then you might get the Page not found error. In order to fix that all you need to do is to override the httpruntime node in the web.config and set the maxRequestLength to something higher then 4096. This will solve your problem. powered by IMHO 1.3 ...
Few days back I blogged about generating the code using the CodeDom classes. You can view that post over here. I worked on it for a little more and now you can input the namespace, class name, database name and the table name from the console. Below you can see a screen shot of the code generator which creates the entity class for the Categories table in the Northwind database. As, you can see that you will have to give the inputs in the required format which is the following: NameSpace:ClassName: ...
I have used gridviews in my asp.net 2.0 applications. One of the requirement is to show the header row even when there are no data rows in dataset. I couldn't find an easy way of doing this. After little bit of R&D, i did that with EmptyDataTemplate of GridView. This works well but is there any easy way of doing this? EDIT on 15-Nov-2007: Following is the sample code of what i did in my application. In this i wanted to show two fields Year and extract date. BTW, this sample is not specific to ...
This article illustrates how to accomplish a number of common tasks with the Microsoft ASP.NET 2.0 GridView control. Each task is accompanied by a description of the new concepts covered, and the complete working examples are available for download with this article. (122 printed pages) Read GridView Examples for ASP.NET 2.0 ...
Sometimes you need to find out that if the urls on the page exists or not. The following code reads the HTML of the page and extracts all the urls and finally checks if the url exists or not. Take a look at the following code: protected void Button1_Click(object sender, EventArgs e) { WebRequest req = WebRequest.Create("http://l... LookIntoDoPostBack/UrlList.... HttpWebResponse res = (HttpWebResponse) req.GetResponse(); Stream stream = res.GetResponseStream(); ArrayList badUrls = new ...
You can select the text inside the TextBox of the GridView when you click inside the TextBox. This is pretty simple here is the code: <EditItemTemplate> <asp:TextBox ID="txtFirstName" onfocus="this.select()" runat="server" Text='<%# Eval("FirstName") %>' /> </EditItemTemplate> powered by IMHO 1.3 ...
If you are curious like me and want to know about the up coming videos on ASPALLIANCE then this is the post for you. Here is the list of the up coming videos: 1) Using the ATLAS Round Corner Control 2) Using the ATLAS TextBox Watermark Control 3) Using the ATLAS Confirm Button Control 4) Using the Timer Control to display and change advertisment without doing a POSTBACK 5) Using the ATLAS PopUp Control (Working with the Calendar Control) 6) Using the ATLAS PopUp Control (Workding with the Calendar ...
With TechEd 2006 less than a week away, I was looking through the session schedule and I thought I'd list some of the sessions I'm most looking forward too. I'm excited about all of the SharePoint Products and Technologies related sessions, but here are a few that I think will be particularly useful (or just fun)... OFC201 The 2007 Microsoft Office System: Clients - Overview and What's NewSpeaker(s): Mark AlexieffThe innovations in the 2007 Microsoft Office system client applications are significant ...
Most of the websites require to present the Nested data to the User. Take a look at the data below which is nested: Category1 Product1 of Category1 Product2 of Category1 Category2 Product1 of Category2 Product2 of Category2 I am sure you get the idea. In my latest article "Nested Repeaters to Display Nested Data" I demonstrated that how you can use nested repeaters with simple DataSet Relations to display the nested data. powered by IMHO 1.3 ...
Wow! it has been one year from the day I started GridViewGuy back in June 2005. The website has been growing steadily since then. I would like to thank all the users who visited the website and made this website worth running. I would like to thank all the users who emailed me with feedback and suggestions. It was because of those feedbacks and suggestions that I was able to improve the website. I would also like to thank all the members of the ASP.NET forums who were always willing to answer my ...
I am wondering that how do you developers deal with questions that comes in your inbox. Questions like how can I export data from the GridView to asking about the three tier achitecture. Do you email the person back with the consulting rates or do you simply answer all those questions? What about recieving 20-30 questions each day how can you answer all of those? Will the paid consulting kicks in at this point?? powered by IMHO 1.3 ...
Hi Everyone, I just wanted to tell everyone that I will be in away from my computer for 2-3 days and will not be able to answer any posts on GridViewGuy. Currently I am in San Antonio enjoying the long weekend. I will be back in the GEEK MODE on Wednesday. Take care everyone and have a great holidays. powered by IMHO 1.3 ...
Few days ago someone asked me that how we can export the GridView control to Excel. The GridView control is inside the FormView control. Check out the complete code below for the solution. using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;u... System.Web.UI.WebControls.W... System.Web.UI.HtmlControls;... System.Data.SqlClient;public partial class _Default : ...
I was tasked to build an rss reader the other day and created a Datalist to display the output. I wanted to display page numbers but then realised that the datalist doesn't have any built in functionality for paging (like the DataGrid and GridView). I was faced with the prospect of rolling my own until I realised that most of the work had already been done for me with the PagedDataSource class! This neat class gives me all of the same functionality as native paging, and was easy to setup. It includes ...
I had little time to peek into WebParts introduced in Whidbhey. It is awesome. Lets talk little bit about this framework. The reason behind the WebParts framework is that you can build your website with more personalization in easy way. To be precise, an WebPart can drag-drop anywhere in the page and the elements in the WebPart can be added or removed by the user. It means, the user can customize the page for himself, and all you get without writing any complicated JS scripts or CSS.The entire ASP.NET ...
Couple of weeks ago I wrote two articles which explained column sorting scenario for the GridView control. I explained sorting bound columns and also auto-generated columns. One important point which I left out was how to remember that which column was sorted. Consider a scenario in which you have 10 columns and you sort the GridView by using one column but after some time you forgot that which column was used for sorting. In this article I will explain that how you can change the column color of ...
I have just published an article on how you can access invisible columns inside the GridView control. You can view the article at this link. powered by IMHO 1.3 ...
I didn't have time to wrap it in a proper control yet. In this post I'll just be putting the page implementation. The gridview is cool and to add an insertrow to it can be done by the footer template. How to do it I explained a while ago : http://geekswithblogs.net/c... If you want to get the controls from the footerrow you will need to address them with GridView.FooterRow.FindCont... For the empty datatemplate it's a little bit trickier but not that much. ...
You can also sort DataBound columns of the GridView. The one thing that you need to do is to make the header columns as the links and write the client side scripts which will handle the client postbacks. Check out the code below. protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.Header) { TableCellCollection cells = e.Row.Cells; foreach (TableCell cell in cells) { cell.Text = Server.HtmlDecode(GenerateS... (cell.Text,GridView1)); ...
We all know that GridView columns can be sorted automatically when SQLDataSource is being used. But what if you are not using SqlDataSource to populate the GridView. Sorting the GridView manually is pretty straight forward task take a look at the code below. private const string ASCENDING = " ASC"; private const string DESCENDING = " DESC"; public SortDirection GridViewSortDirection { get { if (ViewState["sortDirection"] == null) ViewState["sortDirection"] = SortDirection.Ascending; return (SortDirection) ...
Many web applications I work with require a pop-up window to edit the details of an item in a list. For example, a list of authors displayed in a GridView with a button on each row that opens an edit window. Once the data has been updated, the datasource for the parent page needs to be refreshed. Simply using Javascript to refresh the page may display a form repost warning. Resubmitting the parent page's form will behave like a regular postback, so you can't tell if it's a normal postback event or ...
Google's Web API allows you to query the web from a Web Service. It's a beta service and no commercial version available at this time. You're limited to a 1,000 queries a day and and a maximum of ten results per query. These restrictions really limit the potential of the API, but I've found some uses in real-world applications. For example, you can save query results to a database for related links lists. I put together a small example which you can download here. The application simply retrieves ...
GridViewGuy is always open for new articles. If you have written an interesting article that you think will benefit the developer's community than we would like to hear from you. This is also a great way to market yourself in the Information Technology world. Submission Guideline: Submitting an article is very simple. Simply email us your article in html or plain text format in a zip file. If you have any images or project files than include them in a zip folder. We strongly recommend that you also ...
Sometimes, we need to leave the AutoGenerateColumns = true since, we don't know how many columns will be returned from the Database. Another technique is to use ITemplate interface and make your custom Template Columns during runtime. All the columns that are generated automatically are BoundColumns. Sometimes you want to display the column as a link which will open a new window. In the code below I have added the required HTML to the rows of the DataTable and later linked the bound the table to ...
Most probably you guys already know this but GridView control has TemplateField and not TemplateColumn. So, if you are thinking of creating GridView columns dynamically then make sure that you make TemplateField. powered by IMHO 1.3 ...
The marketing gurus at Microsoft singlehandedly support a half dozen Starbucks franchises, no doubt, as they prime their adrenaline pumps to concoct Yet Another Plug (YAP) for the virtues of the .NET Framework. "Write more functionality with 80% less code!", they shout. As a heartfelt idealist, I take these claims seriously, so I have been looking for evidence to support the yapping. Recently, I achieved a wondrous breakthrough that will cheer the Redmond lads and lassies and leave the Java crowd ...
Dino Esposito shows off the power and flexibility of the new ASP.NET GridView by extending it and ending up with something similar to the Hotmail® Inbox grid. Hotmail uses the checkboxes to enable multiple selection in the Grid, not a feature that’s typically part of a DataGrid or GridView. ...
Dino Esposito has another awesome article on MSDN. This one is on setting up user controls on ASP.NET with template properties. From the introduction: Several controls include properties to set with text and values that display through the control's user interface (UI). The typical example is the Caption property of a GridView control; you set the text and the control renders it out on top of the grid. Such a property doesn't offer a great deal of flexibility, because all that it can do is show a ...
If you are wondering that where the hell was AzamSharp AKA GridViewGuy then well, I have a good reason for it. I went to Seattle for an Interview with Microsoft. My interview was scheduled at 8:30 AM on Tuesday (03-21-2006) and due to flight delay I reached Redmond, Seattle at 2:00 AM. So, I guess you get the idea what shape I was in. Anyway, no one wants to hear my condition during the interview but you want to know about the Interview. So, here are the details. I was being intervied by two teams. ...
Although I have written an article on "Export GridView to Excel" I recieve many emails everyday asking the same question repeatedly. So, I decided to make a video tutorial in which I will implement the exportation task from start. You can watch the video at the following link. [Play the video] powered by IMHO 1.3 ...
Some time back I uploaded a video tutorial which demonstrated that how you can select multiple checkboxes inside the GridView control. I got lot of feedback from that video which encouraged me to make another video. This video will be about changing the row color of the GridView control when you put your mouse cursor over it. I was working on this video yesterday and I will complete it today and try to upload today in the evening. The video although, pretty simple but came up 20 minutes of running ...
I just blogged about on how you can change the GridViewRow color by simply moving your mouse pointer on it. Now you can also do an onlclick event on the GridViewRow which will highlight that particular row. The important thing to note is that when you click again on the highlighted row then it should come back to its orginal state. The code below uses the "hidden" field to solve this problem. Take a look at the code below: protected void MyGridView_RowCreated(object sender, GridViewRowEventArgs e) ...
Few months back I blogged about changing the Back Color of the row contained in the GridView control when you put your mouse cursor over it. In this blog entry I am doing the same thing more efficiently. Check out the code below: protected void MyGridView_RowCreated(object sender, GridViewRowEventArgs e) { string onmouseoverStyle = "this.style.backgroundColor... string onmouseoutStyle = "this.style.backgroundColor... string rowBackColor = String.Empty; if (e.Row.RowType == DataControlRowType.DataRow) ...
I have decided that I will write GridViewGuy in ASP.NET 2.0. Although this whole process will take quite a while since I am too busy with my full time job and writing articles but I think it will be a good assignment. I already downloaded the Web Application Projects and migrated the existing Visual Studio.NET 2003 application to Visual Studio.NET 2005. The new GridViewGuy will take advantage of the Web Parts feature. The Atlas project is also released hence I will see if I can implement Atlas in ...