gantt chart

Started by Grievorse, June 26, 2011, 12:01:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Grievorse

We all enjoyed the datalist and the datagrid controls in asp.net datagrid . There were thousands of operations that we can perform using datagrid and datalist control. asp net gridview ships with another data bound templated control which is called Grid View. Grid View has made everything easier for developers. asp net grid changes that I have seen in Asp.net 2.0 is that we don't require a lot of code to achieve tasks but most of the functionality is already provided and built in the control.  
 
In this article we will see the GridView control in action and we will see what type of operations we can dynamic table perform using this control and how this control is better than the classic datagrid control.  
 
Using the sort table Control:  
 
 If you read my previous articles on DataGrid control you might have noticed that we need to write quite a bit of code to enable paging, sorting and selecting an item from the datagrid. Using the gridview control I did not even write a single line and got all the three things i.e, paging, sorting and selection for granted.

Grievorse

The net table control is the successor to the v1.x DataGrid, adding the ability to take advantage of specific capabilities of ASP.NET data source controls. Whereas the v1.x datagrid net required a page developer to write custom code to handle simple operations such as paging, sorting, editing or deleting data, the GridView control can automatically handle these operations provided its bound data table html source control supports these capabilities. The GridView also offers some functionality improvements over the DataGrid, such as the ability to define multiple primary key fields, and some UI customization improvements, such as new field types and templating options. It also exposes a new model for page developers to handle or cancel events.  
 
In the preceding example, the GridView control reflected against the fields of the data records returned by SqlDataSource in order to dynamically generate the columns of the grid. You can data grid also specify explicit column fields to display by adding DataControlField objects to the GridView's Columns collection. This allows you to specify exactly which columns to display and their relative order. The following example demonstrates a collection of BoundField and CheckBoxField objects in the net grid collection. Other field types that can be assigned to this collection are ImageField, HyperLinkField, CommandField, ButtonField, and TemplateField.