Get control instance in asp.net dynamic data

Posted by Ashwani K on Stack Overflow See other posts from Stack Overflow or by Ashwani K
Published on 2010-06-07T09:52:00Z Indexed on 2010/06/07 10:12 UTC
Read the original article Hit count: 409

Filed under:
|

Hello All:

I am creating a web application using Asp.net dynamic data. I am using GridView to show data from the database.

In the grid view I am having following code for columns

 <Columns>
                    <asp:DynamicField DataField="UserId"  UIHint="Label" />
                    <asp:DynamicField DataField="Address" UIHint="Address"/>
                    <asp:DynamicField DataField="CreatedDate" UIHint="Label" />
                </Columns>

But, before displaying I want to do some processing in C# code for each row. In normal ASP.net grid view we can handle OnRowDataBound method, and using FindControl("controlid") we can get the control instance, but in case of dynamic data, I am not getting any id attribute for columns, so I am not able to get the control instance to show updated data in that control depending on some conditions.

Thanks, Ashwani

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about dynamic-data