| |||||||||||
DataGrid.ItemDataBound EventSystem.Web.UI.WebControls Namespace DataGrid Class Occurs after an item in the DataGrid is data-bound but before it is rendered on the page. [ VB ] Public Event ItemDataBound As DataGridItemEventHandler [ C# ] public event DataGridItemEventHandler ItemDataBound; [ C++ ] public: __event DataGridItemEventHandler* ItemDataBound; In [ JScript ], you can handle the events defined by a class, but you cannot define your own. RemarksThe ItemDataBound event is raised whenever an item in the DataGrid is bound to data. This event provides an opportunity to access each item ( or row ) before the page is finally sent to the client for display. After this event is raised, the data item is nulled out and no longer available. This event is raised for the header, the footer, and data items. Event DataInformation related to the ItemDataBound event is passed via a DataGridItemEventArgs object to the method assigned to handle the event. The following DataGridItemEventArgs property provides information specific to this event.
ExampleThe below snippet shows how to attach a handler for the ItemDataBound event. <asp:datagrid id = "myDataGrid" runat = "server" onItemDataBound = "doWhatever" ... > The following examples demonstrate how to code a handler for the ItemDataBound event of a DataGrid control in different scenarios.
See AlsoDataGrid Members ItemCreated DataGridItemEventHandler |
| ||||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme