【问题标题】:Hide databound RadGrid rows隐藏数据绑定的 RadGrid 行
【发布时间】:2012-11-11 11:55:56
【问题描述】:

我的 .aspx 页面名称 rgLowRise 中有一个 Telerik radgrid,并且我有一个 ObjectDataSource 作为 DataSource 集,如 rgLowRise.DataSourceID = odsLowRise。这工作正常,但我希望它在第一次加载时不显示任何记录,我该怎么做?由于某些原因,我必须使用DataSourceID 而不是DataSource

谢谢

【问题讨论】:

    标签: asp.net data-binding telerik radgrid objectdatasource


    【解决方案1】:

    您可以从标记或后面的代码 (Page_Load) 中删除 DataSourceID 并在稍后阶段设置,例如Button_Click 或其他一些事件

    protected void Button_Click(object sender, EventArgs e)
    {
        rgLowRise.DataSourceID = odsLowRise; //until you click this button, the grid would display nothing
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-12-27
      • 1970-01-01
      • 2013-07-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-26
      • 2012-09-30
      相关资源
      最近更新 更多