Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a commandcolumn which I am generating through code. But now the problem is as soon as I refresh the grid another column of the same type appears and it keeps on appearing on the refresh. Is there any way I cal clear the all columns and then set the datasource?
Thank You.
Posted
Comments
baliram bhande 18-Apr-14 5:53am    
what you have tried?? please see your code
Nosheen Javed 18-Apr-14 6:17am    
public void RefreshData()
{
RouterTypesGridView.Columns.Add(new GridViewCommandColumn() { FieldName = "Delete", NullValue = null, HeaderText = "Delete", UseDefaultText = true, DefaultText = "Delete", Width = 80 });
RouterTypesGridView.CommandCellClick += new CommandCellClickEventHandler(RouterTypesGridView_CommandCellClick);

}
Nosheen Javed 18-Apr-14 6:18am    
This is the code I have written but before refresh I want to clear this column first

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900