| |||||||
DataGridColumnCollection.RemoveAt MethodSystem.Web.UI.WebControls Namespace DataGridColumnCollection Class Removes a DataGridColumn from the collection at the specified index. [ VB ] Public Sub RemoveAt ( _ ByVal index As Integer _ ) [ C# ] public void RemoveAt ( int index ); [ C++ ] public: void RemoveAt ( int index ); [ JScript ] public function RemoveAt ( index : int ); Parameters
RemarksUse this method to remove a DataGridColumn derived object from a DataGridColumnCollection at the specified index. The DataGrid control does not store the contents of its Columns collection into the view state. To add or remove a column dynamically, you must programmaticallt add or remove the column each time the page is refreshed. Provide a Page_Init function that adds or removes the column before the DataGrid control can reload its state and rebuild itself. Otherwise, the changes to the Columns collection are not reflected in the DataGrid control when it is displayed.
ExampleThe following example demonstrates how to use the RemoveAt method to dynamically remove a column from a DataGrid control.
See AlsoDataGridColumnCollection Members Remove Add AddAt |
| ||||||
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