Add/Remove Columns at Runtime
Hi,
Is it possible to add/remove columns at runtime. When removing columns I want to completely remove not just hide them so they don't show in the column chooser.
Also, is it possible to check if a certain column is present the grid. This is when the grid is initialized from a flat file ( serialized state)
Please let me know,
Thanks,
Deepak
0
-
Hi,
The grid is designed to add/remove columns at runtime with the following API:
//Add/remove column
Column column = new Column("SomeColumn");
grid.Headers[0].Add(column);
grid.Headers[0].Remove(column);
//Get existing column
column = grid.Headers[0]["SomeColumn"];
if (column != null)
{
//...
}
//Iterate all columns in the header
foreach (Column column in grid1.Headers[0])
{
//...
}Best regards,
Dapfor
0
Please sign in to leave a comment.
Comments
1 comment