在ObjectDataSource控件DevEx preSS AspxGridView过滤器 [英] DevExpress AspxGridView filter in ObjectDataSource

查看:259
本文介绍了在ObjectDataSource控件DevEx preSS AspxGridView过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

然而,随着DevEx preSS AspxGridView另一个问题:)

Yet another problem with DevExpress AspxGridView :)

上下文:


  • 单页

  • One Page

在页,自定义控件

在自定义控制,AspxDropDown

In the custom Control, a AspxDropDown

该AspxDropDown,有DropDownWindowTemplate

The AspxDropDown, has a DropDownWindowTemplate

在DropDownItemTemplate,我添加了一个GridView和寻呼/排序/筛选启用ObjectDataSource控件

In the DropDownItemTemplate, I add a GridView and a paging/sorting/filtering enabled ObjectDataSource

在处理ObjectDataSource控件的选择时,我应该为数据源滤波器参数。有滤波器参数应该来自AspxGridView的FilterRow(pferably使用AspxGriedView.FilterEx pression财产$ P $)。

When handling the Selecting event of the ObjectDataSource, I should set filter parameters for the datasource. There filter parameters should come from the FilterRow of the AspxGridView (preferably using the AspxGriedView.FilterExpression property).

的问题:AspxGriedView.FilterEx pression属性未设定为适当的值(由用户设置)。

The problem: the AspxGriedView.FilterExpression property is not set to the proper values (set by the user).

有没有人找到一个很好的实现什么,我想在这里做什么?

Did anyone find a good implementation of what I'm trying to do here?

感谢一大堆。

:)

推荐答案

我终于设法解决此问题。

I've finally managed to get around the problem.

不是一个好的解决方案,但仍,一种方法来解决它。

Not a good solution, but, still, a way to work around it.

所以..该办法是数据绑定在每个AfterPerformCallback事件电网。

So.. The "solution" is to databind the grid on every AfterPerformCallback event.

void grid_AfterPerformCallback(object sender, ASPxGridViewAfterPerformCallbackEventArgs e)
    {
        ((DevExpress.Web.ASPxGridView.ASPxGridView)sender).DataBind();
    }

我已经说过了,这不是一个很好的解决方案。

As I've said, it's not a good solution.

这篇关于在ObjectDataSource控件DevEx preSS AspxGridView过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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