拉德Telerik的GridGroupByExpression不分组,直到我点击排序网格按钮
题
我有一个radgrid控件与数据表作为它的源。 我已AllowCustomPaging设置为真。
<telerik:RadGrid runat="server" ID="RadGridSearchResults"
PageSize="50" AllowPaging="true" AllowCustomPaging="true"
OnNeedDataSource="RadGridSearchResults_NeedDataSource" Skin="Default">
<PagerStyle Mode="NextPrevNumericAndAdvanced" />
</telerik:RadGrid>
对于我的代码后面方法RadGridSearchResults_NeedDataSource刚好充满,并返回一个数据表有以下的列中的代码:
dataTableSearchResults.Columns.Add("recipeId", typeof(string));
dataTableSearchResults.Columns.Add("ingredientsIds", typeof(string));
dataTableSearchResults.Columns.Add("country", typeof(string));
dataTableSearchResults.Columns.Add("author", typeof(string));
dataTableSearchResults.Columns.Add("style", typeof(string));
dataTableSearchResults.Columns.Add("friendly", typeof(string));
dataTableSearchResults.Columns.Add("name", typeof(string));
一旦radgrid控件是数据绑定,我运行下面的:
var expression = GridGroupByExpression.Parse(
"recipeId [Recipe], count(recipeId) ingredientsIds [Ingredients]
Group By recipeId");
this.RadGridSearchResults.MasterTableView.GroupByExpressions.Add(expression);
this.RadGridSearchResults.GroupingEnabled = true;
我希望我的radgrid控件就那么看着像他们的这里有一旦你点击了‘集团通过表情’按钮:
相反,它看起来像这样:
只有寻找之后我点击“排序”按钮:
任何线索?我甚至尝试手动排序调用但没有成功。
解决方案
在添加的组表达,你叫网格以刷新其状态的重新绑定()方法?这是您应用的回发事件处理分组的情况下,其不会隐重新绑定控制必要的。
迪克
不隶属于 StackOverflow