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
225
Find Control From WebDataGrid
posted

How to find WebDropdow Control from Webdatagrid without Using of Item[Index]

how to find webdropdown from webdatagrid,

We want to find control from WebDataGrid without using column index


we could achive using following code in cs file but we want to find control without going to itemindex level WebDropDown

WebDropDown1 = (WebDropDown)WebDataGrid1.Rows[0].Items[2].FindControl("WebDropDown1");


i.e. we would like to find control using following code like we an in asp:GridView control
WebDropDown WebDropDown1 = (WebDropDown)WebDataGrid1.Rows[0].FindControl("WebDropDown1");

if we write above line then WebDropDown1 returned as NULL so we get error of object reference not set to an instance of object.