Multi Level Grouping in SharePoint List Programmatically
<SharePoint:ListViewByQuery ID="TestID" runat="server" /> In Code Behind: SPList oList = web.GetList("SampleList"); TestID .List = oList; SPQuery query = new SPQuery(oList.DefaultView); query.Query= "<GroupBy Collapse='FALSE'><FieldRef Name='Title' /><FieldRef Name='Subject' /></GroupBy>"; TestID .Query = query; Hope this will helps you!!! Happy coding....