public GridColumn FindByUniqueName(string UniqueName);
public GridColumn FindByUniqueNameSafe(string UniqueName);
As name suggest first method is not safe, it can throw GridExceptions if no column is found, where second one is returning null if no column is found. Along with these tow method, it have one property name UniqueName; this property helps FindByUniqueName and FindByUniqueNameSafe to find the column. So now we don’t need to remember the column id also we can now easily change the sequence of column as they are not referring with unique name.
<telerik:GridTemplateColumn UniqueName="Clients" HeaderText="Clients">
And server side write following code.
GridColumn gridColumn = dgTest.Columns.FindByUniqueNameSafe("Clients");
if (gridColumn != null)
gridColumn.Visible = false;
3 comments:
Thank you. This was helpful.
I am generating the columns dynamically. So, I am not able to find out which column/cell user click on. And I need to send the header text information to the database.
for example, if the columns are col1, col2, col3. the data is in row1 is 1,2,3 and the data in row2 is 4,5,6.
If user clicks on 2 on row1, I need a text col2. How can I do that
telerik show hide columns
telerik show hide columns(Click Here)
Post a Comment