I have this ASP code:
<ext:GridPanel ID="grid">
<ColumnModel runat="server">
<Columns>
<ext:RowNumbererColumn />
<ext:Column Align="Center" ColumnID="Type">
</ext:Column>
// closing tags
I want to get the columns object. I’m trying this:
var typeCol= this.grdResourceState.ColumnModel.Columns.Where(column => column.ColumnID == "Type"); // this works
var typeColRef= FindControl("grdResourceState.ColumnModel.Columns"); // this is a null
What do I do to make FindControl be able to search control children?
You should assign an id to the ColumnModel control and then retrieve if. Once you got it you can access the children controls:
Then:
Here’s more info on the FindControl method