【问题标题】:Xtragrid: Apply custom filter without rebinding the datasourceXtragrid:应用自定义过滤器而不重新绑定数据源
【发布时间】:2014-04-11 15:21:34
【问题描述】:

我使用 Xtragrid 控件和 BindingList 作为数据源,以及 gridView 控件的 CustomRowFilter 事件。当我调用 BindingList.ResetBindings 时它工作正常,但它会重置当前选择。

有没有办法在不调用 BindingList.ResetBindings 的情况下强制新过滤器(通过 CustomRowFilter 事件处理程序)?

【问题讨论】:

    标签: winforms devexpress xtragrid


    【解决方案1】:

    使用RefreshDataSource 方法更新显示在网格控件的视图中的数据:

     //Refresh the grid control 
     gridControl1.RefreshDataSource();
    

    我建议您通过以下参考链接:
    Refreshing the GridControl
    GridControl.RefreshDataSource

    【讨论】:

      【解决方案2】:

      我自己找到了解决方案:

      xtraGrid.RefreshDataSource()
      

      【讨论】:

        猜你喜欢
        • 2021-04-06
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-06-21
        • 1970-01-01
        相关资源
        最近更新 更多