在子网格中查找复选框控件的ID [英] Finding ID of the check box control in child grid

查看:60
本文介绍了在子网格中查找复选框控件的ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我正在使用telerik ....构建层次结构网格...,并且在d网格内部使用复选框创建了IM,以便用户可以选择该复选框并将其删除....IM面临的问题是如何获取的ID.后面的代码中的内部网格(子网格)...任何建议frens ?? ..


在此先感谢
Darshan

Hi frens,


I m building hierarchial grid using telerik.... and im using check box inside the d grid so that the user can select the check box and delete it.... the problem im facing is tat how to get the check box ID of the inner grid( child grid) in code behind ...Any Suggestions frens ??..


thanks in advance
Darshan

推荐答案

public static T FindControl<T>(this Control parent, string controlName) where T: Control
    {     T found = parent.FindControl(controlName) as T;
    if (found != null)
    return found;
    foreach(Control childControl in parent.Controls)
{
    found = childControl.FindControl<T>(controlName) as T;
    if (found != null)
    break;
}
return found;
}




引用自 http://stackoverflow.com/questions/1167682/gridview-accessing-child-gridview-复选框




refered from http://stackoverflow.com/questions/1167682/gridview-accessing-child-gridview-checkbox


这篇关于在子网格中查找复选框控件的ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆