ASPxPivotGrid定制删除排序/订单 [英] ASPxPivotGrid remove custom sort/order

查看:479
本文介绍了ASPxPivotGrid定制删除排序/订单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我code创建的列,3行区,休息列区域,以及所有那些在行区域由名称分组,我不希望任何分组/排序,因为我排序和分组它,因为我想在存储过程。

I created columns in code, 3 to Row Area, rest in column area, and all those in row area are grouped by name, and I don't want any of grouping/sorting, because I sorted and grouped it as I want in stored procedure.

不知道如何禁用自动分组/排序?

Any idea how to disable automatic grouping/sorting?

感谢

推荐答案

参考:的我可以禁用排序?

这是不可能禁用排序。该PivotGridControl组数据
  用相同的值来计算概要。该操作需要
  数据进行排序。另外,在PivotGridControl每行或列
  可能与数据源的多个记录相关联。其他
  即,没有办法来唯一地标识的行和列顺序
  在PivotGridControl。

it's impossible to disable sorting. The PivotGridControl groups data by identical values to calculate summaries. This operation requires data to be sorted. Also, each row or column in the PivotGridControl might be associated with multiple records in the data source. In other words, there is no way to uniquely identify the rows and columns order in the PivotGridControl.

在这种情况下,有必要将数据通过处理ASPxPivotGrid.CustomFieldSort事件手动排序。做你的排序,并在此event.Below分组的计算,我已经发布了code片段,演示了如何禁用排序:

In this case, it is necessary to sort data manually by handling the ASPxPivotGrid.CustomFieldSort event. Do your calculation of sorting and grouping at this event.Below, I have posted a code snippet, demonstrating how to disable sorting:

private void pivotGridControl1_CustomFieldSort(object sender, PivotGridCustomFieldSortEventArgs e)
{
    e.Result = e.ListSourceRowIndex1.CompareTo(e.ListSourceRowIndex2);
    e.Handled = true;
}

参考:结果
禁用按行/列排序功能结果
如何禁用排序和过滤功能结果
SortOrder的改变的事件处理程序结果
关于网格默认排序字母

<一个href=\"http://documentation.devex$p$pss.com/#Silverlight/DevEx$p$pssXpfPivotGridPivotGridCommands_ClearSortingtopic\"相对=nofollow> PivotGridCommands.ClearSorting物业

查看 AspxPivotGrid排序在你的计算帮助部分。

check the AspxPivotGrid Sorting section for help in your calculations.

ASPxPivotGrid的 PivotGridOptionsCustomization.AllowSort 选项。结果
其中的字段值进行排序由指定的顺序字段的 PivotGridFieldBase.SortOrder 属性。

ASPxPivotGrid's PivotGridOptionsCustomization.AllowSort option.
The order in which field values are sorted is specified by a field's PivotGridFieldBase.SortOrder property.

这篇关于ASPxPivotGrid定制删除排序/订单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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