I'm trying to implement in my GridView custom Server Control things that works in my application.
In the application I have HiddenField and JavaScript store in this field Cell what is clicked in GridView, so I can read this value also on server side and everything works fine.
But, when I try this implement in my Custom Composite Server Control that not works. I tried also with Sessions, but also I cannot set Session variable from Javascript.
So, I decide to create CompositeControl that have GridView and HiddenField.
Added ChildControls, but when add Control to my WebForm, GridView is not visible on the page. (Yes, I've addded property true before creating childcontrol)
The error:
Type 'MyServerControl:testGridView' does not have a public property named 'Columns'"
My code:
<cc1:testGridView ID="testGridView1" runat="server" AutoGenerateColumns="False" DataSourceID="XmlDataSource1">
<Columns>
<asp:BoundField DataField="TestId" HeaderText="TestId" SortExpression="TestId" />
<asp:BoundField DataField="TestType" HeaderText="TestType" SortExpression="TestType" />
</Columns>
</cc1:testGridView>
Can somebody tell where i can find some info about Composite control with GridView or help me from own experience?