Hi.
I'm trying to implement in my GridView custom Server Control things that works in my application.
I tried to make Server Control inherited from GridView and then i stuck in problem that i don't know how to resolve.
In 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.
Normally add ChildControls.... but when add Control to my WebForm, GridView is not visible on page (Yes, i add property true before creating childcontrol),
and show me error that "Type 'MyServerControl:testGridView' does not have a public property named 'Columns'"
<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?
Thank you
I'm trying to implement in my GridView custom Server Control things that works in my application.
I tried to make Server Control inherited from GridView and then i stuck in problem that i don't know how to resolve.
In 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.
Normally add ChildControls.... but when add Control to my WebForm, GridView is not visible on page (Yes, i add property true before creating childcontrol),
and show me error that "Type 'MyServerControl:testGridView' does not have a public property named 'Columns'"
<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?
Thank you