The ListViewByQuery Control
Lately I’ve been busy documenting the out of the box SharePoint controls. There are out of the box user controls, which are located in the 12\TEMPLATE\CONTROLTEMPLATES folder. There are a lot of server controls ready to be used by you and are located in the Microsoft.SharePoint.WebControls namespace of the Microsoft.SharePoint.dll.
One of the controls I describe is the ListViewByQuery control. One of my blog readers pointed me to a problem with this controls when using a GroupBy query.
string query = "<GroupBy Collapse='FALSE'><FieldRef Name='CountryRegionName' /><FieldRef Name='City' /></GroupBy>"; SPQuery qry = new SPQuery(list.DefaultView); qry.Query = query; qry.RowLimit = 2000; CustomersListViewByQuery.Query = qry;
When you specify that you want to show the groups collapsed, you can expand all groups, except the most inner one. It show a Loading label but nothing ever happens:
If someone else achieves this, I will be glad to here it!