Is it possible to have multiple grouping in SPGridview? Grouping is working fine for a single column? Is there any way to have multiple grouping in SPGridView programmatically
I don't think this is possible using SPGridView.
From what I've found out, the grouping is based on setting the SPGridViewRow.HeaderText
property. I think I used Reflector to figure this out.
Unfortunately, SPGridViewRow is a sealed class. If you can figure out any way to get around this let me know.. The only thing I can think of is to inherit from GridView and rewrite all the SPGridView functionality.
You can try to build a nested gridview user control in ASP.NET http://www.codeguru.com/columns/vb/article.php/c12647/ and host the user control in a web part.
protected override void CreateChildControls() { base.CreateChildControls(); try { this.Controls.Clear(); GridViewWebUserControl = this.Page.LoadControl("~/_controltemplates/WebPart1/GridViewWebUserControl.ascx"); } catch (Exception e) { err = e.Message; } }
Not is possible multiple grouping in SPGridView.
I'm the suggest, that you are use
http://www.agrinei.com/gridviewhelper/gridviewhelper_en.htm
SPGridView is good the following scenario:
One Group with SPDataSource and SPList.