Very useful.i was struggling for the bidirectional sorting for a long worked fine.thanks a ton It is very good to know about our needed search but we nedd appropriate example I have looked at sample after sample online, and this detailed listing laid out the logic in a simple to understand manner. I hope you find this method of bidirectional sorting while maintaining the criteria state easy to use. " Select * From tblOrder Where Or" All”) And Or" All”) And (.>=" And. Ĭreate an OleDbCommand that has a stored procedure from MS Access, e.g.: This tip shows you how to sort a DataGrid ascending and descending for any column while retaining the filter criteria. This article shows how to, in few simple steps, implement bidirectional sorting for DataGrids while maintaining the filter status (criteria). Print Add To Favorites Email To Friend Rate This ArticleĬodeSnip: Bidirectional Sorting of a DataGrid in VB.NET Read More with full source code here ( Hierarchical Tutorials » CodeSnip: Bidirectional Sorting of a DataGrid in V. Then the Category ID is used to fetch the respective Product rows from the Database. In the RowDataBound event using the DataItem property we can access the Category ID of the respective row. And the Product is used in the inner GridView. So for this example also I have chosen the Categories and products. Hierarchical Dataįor simpler explanation I always use the Northwind Database. Further all the controls can be accessed in a row using the rows FindControl Method. So to access each row the RowDataBound is the right event. The inner GridView is named as GridView2 and it is placed inside the ItemTemplate in the TemplateField of the GridView1. RowDataBound to access the inner GridView I have used CSS to style the label so the user will click on the (+) and (-) without further instructions. This example I am using a label with ‘+’ (Plus) sign for expanding and a ‘-‘(Minus) sign for collapsing. However we can still get a Asp.Net Hierarchical GridView, by using a GridView inside another GridView’s TemplateField. But wait one moment, there is no Hierarchical Grid as we have in Classic VB. If this is your case then the Asp.Net Hierarchical GridView is right choice. But there are some situations you may need to have various controls on each node. I usually choose a TreeView for this kind of hierarchical data or I choose ASP.Net menu. Hierarchical GridView Using TemplateField
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |