Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
260
Unable to find template control after sorting
posted

Hello

I have a webdatagrid that uses a templatefield which contains a linkbutton. When i fill the grid i add a handler to the button in the initializeRow.

I have also added the sortingcode for templatefields with the help of this link http://ko.infragistics.com/community/forums/t/67075.aspx

The linkbutton works without a problem if you don't sort, the sorting works as well, however if you sort and then click the linkbutton the code in the initializerow can't find the control anymore. I use the following code to find the controle: e.Row.Items.FindItemByKey("Select").FindControl("btnSelect")

When you sort the same initialzerow is being run without a problem, it only happens when you click the linkbutton.

Any pointers would be very welcome