In SharePoint for Gridview result I have used SPGridView. When I set the datasource for the SPgridview I came across an error “Value cannot be null. Parameter name:propName”. Then I checked the properties I have set.
SPGridView have the option to Group the Result based on a column. It has one property called “AllowGrouping” When you set the AllowGrouping=true, you have to set the following property along with it.
Other Properties are
SPGridView.AllowGroupCollapse = false;
SPGridView.GroupDescriptionField = “Title”;
SPGridView.GroupFieldDisplayName = “Title Text”;