Hi
I have searched the forums and can't see anything that seesm to match my case.
I want to hide a column based on a value set in a settings table. No problem getting the
setting value as true or false, but I can't make the column hidden.
Columns are not autogenerated and the column in question is declared like this
How can this be made visible/invisble from the code behind?
I have tried this below but I think it is applicable only to autogenerated columns.. Anyway it does not do anything.
Thanks for help here!
Clive
I have searched the forums and can't see anything that seesm to match my case.
I want to hide a column based on a value set in a settings table. No problem getting the
setting value as true or false, but I can't make the column hidden.
Columns are not autogenerated and the column in question is declared like this
<telerik:GridBoundColumn DataField="StockQuantity" DataType="System.Int16" |
HeaderText="Stock" SortExpression="StockQuantity" |
UniqueName="StockQuantity"> |
</telerik:GridBoundColumn> |
How can this be made visible/invisble from the code behind?
I have tried this below but I think it is applicable only to autogenerated columns.. Anyway it does not do anything.
Protected Sub RadGrid1_ColumnCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridColumnCreatedEventArgs) Handles RadGrid1.ColumnCreated |
If e.Column.UniqueName = "StockQuantity" Then |
e.Column.Visible = False |
End If |
End Sub |
Thanks for help here!
Clive