Hi,
I am using a webgrid with the following columns:
Section, Question Number, Question, Answer
I'd like the grid to be grouped by the "Section" column without requiring the user to drag it to the top. How can this be done?
Also, can I set the "Question Number" column to be sorted by default, too?
Thanks
Alistair
I was able to get both to work in v6.2.
You have to sort by multiple columns to get it to work. Which makes sense when you think about it because the grid needs to be sorted by the "group by" column in order for the group by to work.
To do this follow these steps.
This will enable it so that in each group the grid is sorted by the second column but not in the grid overall because that wouldn't make sense.
I hope that helps you out.
Amy
In IG 6.3 I was able to do the GroupBy or the Sort, but not both.
To group, after the grid is populated, do something like this:
lCol = Me.RecipientAgencyUltraWebGrid.Columns(RECIPIENT_GRID_COLUMN_NUMBER_TYPE)lCol.IsGroupByColumn = True 'set as GroupeBy column
To sort, after the grid is populated, do something like this:
Me.RecipientAgencyUltraWebGrid.Bands(0).SortedColumns.Add(RecipientAgencyUltraWebGrid.Columns.FromKey("AgencyName"), True)
There's a thread on this in the old forum archive:
http://forums.archive.infragistics.com/readmessage?id=%3C58f89e1f$753428b0$4647@news.infragistics.com%3E&group=#%3C58f89e1f$753428b0$4647@news.infragistics.com%3E
HTH