【问题标题】:ASPxGridView -Custom Controls in DetailRowASPxGridView - DetailRow 中的自定义控件
【发布时间】:2013-08-06 03:34:50
【问题描述】:

我尝试在 DevExpress 网格详细信息行中使用自定义控件。每当扩展一行时,我想将数据加载到基于 Masters Key 的那些自定义控件中。 我正在使用 detailrow 扩展方法。

protected void grid_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e)
    if (e.Expanded)
    {
        int id = Convert.ToInt32(grd.GetRowValues(e.VisibleIndex, "ID"));
        ...
    }

问题是我不知道如何访问已扩展的详细信息行中的自定义控件。我在网格上看不到任何 Row 或 Items 属性,这本来是使用 FindControl() 的。 有人知道如何获取详细信息行甚至行对象吗?

谢谢!

【问题讨论】:

    标签: asp.net devexpress aspxgridview


    【解决方案1】:

    试试这个:

    protected void grid_DetailRowExpandedChanged(object sender, ASPxGridViewDetailRowEventArgs e)   
    if (e.Expanded)   
    {   
        YourControlType yourcontrol = (YourControlType)grid.FindDetailRowTemplateControl(e.VisibleIndex, "YourControlName")
    }   
    

    【讨论】:

      猜你喜欢
      • 2012-12-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多