English 中文(简体)
使用域集合查看来分组和定位
原标题:Grouping and Paging with DomainCollectionView

我试图在RIA Services同时进行分组和调用(在数据格中) 。 我已经有一个非常精密的用户控制程序, 其基础是卓越的域采集查看。 然而, 我无法完成分组工作 。

我在样本中添加了这条线:

this.CollectionView.GroupDescriptions.Add(new PropertyGroupDescription("Int32"));

Note about the sample: I changed how Int32 is being assigned as key % 2, so there should be two resulting groups, which should have hundreds of items per group. The paging is set to 10 items. No grouping is applied at the query level.

因此,在这种情况下,我希望分组页头显示项目总数,然而,它只是0组,因为项目计数为10,这显然不正确。它只是在第一页显示项目计数。

Question Did any make grouping and paging work together with or without DomainCollectionView?

有关上下文,请参见关于Domain CollectionView 的文章,http://code.msdn.microsoft.com/Server-Side-Filtaring-Mithebeda" rel=“nofollow” > 标本上贴的样本

最佳回答

微软公司的Kyle McClellan就此问题答复了个人电子邮件,并详细解释如下。

简言之,分组和调用不会很好地一起工作-你肯定不会在数据格瑞德获得一个完全有特色的分组经验。

对我而言,解决办法是当分组出现时消除呼声。

On Wed, Jun 6, 2012 at 7:51 PM, Kyle McClellan wrote: Ah, now I understand what you were expecting. There are two (competing?) things at play here. First, the client technology knows nothing about the server. It only sees data that exists locally. Because of this, the controls, etc. will report that there’s only a single group and it only contains a page’s worth of data. Second, the server technology can see the all the data but has only been asked to return a single page. It sorts and slices the data appropriately and then returns it. It could determine the number of groups and the size of each, but there’s no way to communicate it back to the client.
What you’re seeing is the view functioning as designed. It will show you all the items in group 0 before all the items in group 1. At some point in the middle you will see two groups on a page, but otherwise the results will all be in the same group.

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签