viewstate of the user control inside datagrid...

O

Oleg G.

Hi there!
I have datagrid with template column and I am using the same user control
for display (in ItemTemplate) and collect (in EditItemTemplate) information.
The user control is a number of text boxes basically in this case. But when
I put some values into this control (LinksData2) and go back to the server I
am not able to pick up the data from the control (LinksData2). It seems it's
not stored in ViewState at all. In the same time if I have the same control
on the page but outside of datagrid it works fine. How can I get the data
from the user control placed inside template column?

<asp:TemplateColumn>
<ItemTemplate>
<uc1:LinksData id="LinksData1" runat="server" IsReadOnly="True"
LinkData='<%# FillLinkData(DataBinder.Eval(Container.DataItem, "Url"),
DataBinder.Eval(Container.DataItem, "Description")) %>'></uc1:LinksData>
</ItemTemplate>
<EditItemTemplate>
<uc1:LinksData id="LinksData2" runat="server"
IsReadOnly="False"></uc1:LinksData>
</EditItemTemplate>
</asp:TemplateColumn>


Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,689
Members
48,796
Latest member
Greg L.

Latest Threads

Top