How can I access TemplatedDataField's controls from server-side event InitializeRow? I tried the Row.FindControl(...) method but no success. Also I didn't find any samples on the web, only for the UltraWebGrid, but I'm using WebDataGrid and they are quite different.
I believe the following post provides the answer you're looking for:http://forums.infragistics.com/forums/p/13647/50458.aspx#50458
I read that thread already but with any luck. It's about UltraGrid I think or at list I didn't find such properties on my WebDataGrid.
I provide some code for my case.
WebDataGrid columns are defined like this:<Columns> <igGrid:TemplateDataField Key="Name"> <ItemTemplate> <asp:HyperLink ID="hlPartnerName" runat="server"></asp:HyperLink> </ItemTemplate> <Header Text="Name" /> </igGrid:TemplateDataField> <igGrid:TemplateDataField Key="Country"> <ItemTemplate> <asp:Label ID="lblCountry" runat="server"></asp:Label> </ItemTemplate> <Header Text="Country" /> </igGrid:TemplateDataField> </Columns>
And in InitializeRow event I have tried the following, but all returned null.
e.Row.FindControl("hlPartnerName")e.Row.Items[0].FindControl("hlPartnerName")e.Row.Items[0].Record.FindControl("hlPartnerName")
Am i missing or doing something wrong here?
dinoboy said:I read that thread already but with any luck. It's about UltraGrid I think or at list I didn't find such properties on my WebDataGrid.
Okey, got it working finally. It came out, that it was a bug and was fixed in the latest hotfix (version 8.3.20083.2039). After installing the hotfix I was able to access controls using following code:
e.Row.Items[0].FindControl(...) in InitializeRow event