- Gridview OnRowBound event is fired when we do gridview.databind(); When we do a postback the data in the gridview is displayed using viewstate if gridview viewstate is enabled, but any formatting done in OnRowBound is lost.
- If you have dynamically generated controls in gridview header (dropdownlist, textbox etc), it's better to put the code that generates the controls in gridview RowCreated event, since it'll get fired even when postback.
- To sort gridview we need to have a SortExpression bind to a boundField. We then have a method to handle GridViewSortEvent.
Friday, June 5, 2009
Asp.Net Gridview notes
Some notes on things I encountered recently. Will put some sample code once I am done with current project and have a stable code
Labels:
asp.net,
programming
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment