Hi,
We are using radgrid latest version. We have a global routine used to loop thru rows of grid. THis is used in multiple page. On some page, grid has templated column with textbox and on other pages, grid tempate column has checkboxes. So, when grid is passed to global routine and loop thru rows, I need to check for templated column control type. If it is checkbox, I need to do some logic and if it is textbox, I need to do some other logic. Please let me know how to write code. FindControl expects ID. I know the id of both controls, but I don't know which one to use.
Something similar this
{
//get the type of control
Control ctl = typeof(row.findcontrol(...);
if typeof(ctl) is Checkbox
//do something
if type(ctl) is TextBox
//do something else.
}
This logic needs to be in global routine outside radgrid events.
Thank You
We are using radgrid latest version. We have a global routine used to loop thru rows of grid. THis is used in multiple page. On some page, grid has templated column with textbox and on other pages, grid tempate column has checkboxes. So, when grid is passed to global routine and loop thru rows, I need to check for templated column control type. If it is checkbox, I need to do some logic and if it is textbox, I need to do some other logic. Please let me know how to write code. FindControl expects ID. I know the id of both controls, but I don't know which one to use.
Something similar this
foreach (GridDataItem row in radGrid1.Items)
{
//get the type of control
Control ctl = typeof(row.findcontrol(...);
if typeof(ctl) is Checkbox
//do something
if type(ctl) is TextBox
//do something else.
}
This logic needs to be in global routine outside radgrid events.
Thank You