Question

I have an SPGridView and when grouping on it, it displays groups perfectly.

However, in the SharePoint native list view, we can specify the view to filter and grouping on some columns etc.

When using grouping, the native list displays the number of element inside the group just front of the group name as you can see in the screenshot below:

enter image description here

So how do I do the same on my SPGridView ? I would prefer a solution that does not involve the use of JQuery or JavaScript. Nevertheless, if there is no standard procedure to do it (adding attributes, enable some options, etc) I accept any other solution. Thank you.

Était-ce utile?

La solution

Obviously, it is not possible to enable any count option on SPGridView. Instead I had to use JS to count every lines in the group and then modify the DOM dynamicaly by adding the number of line next to the group label.

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top