Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
75
Grouping multiple columns in ultrawebgrid
posted
Basically I need to group by multiple columns since one of them has different fields. Example:
column1    column2   column3
bla            bla            test 1
bla            bla            test 2
bla            bla            test 3

What i need is that it groups column1 and column2 so that it expands to show what there is in column3. I am currenty using version 7.1 don't know if it supports this functionality This is the code that I am using but it still displays a flat grid.

Here's the code I am using grid.

DisplayLayout.ViewType =Infragistics.WebUI.UltraWebGrid.ViewType.OutlookGroupBy
 grid.DisplayLayout.SelectTypeCellDefault = UltraWebGrid.SelectType.Extended grid.DisplayLayout.BorderCollapseDefault = UltraWebGrid.BorderCollapse.Separate
grid.DisplayLayout.LoadOnDemand = UltraWebGrid.LoadOnDemand.Automatic
grid.DataBind_Grid() grid.DisplayLayout.Bands(0).SortedColumns.Clear()

For Each uwgCol As UltraWebGrid.UltraGridColumn In grid.Columns
If uwgCol.Key <> "roleName" Then grid.Columns(uwgCol.Index).IsGroupByColumn = True grid.DisplayLayout.Bands(0).SortedColumns.Add(uwgCol.Key)
End If
Next
 Dim row As UltraWebGrid.UltraGridRow
For Each row In grid.Rows
row.ShowExpand = True
Next row
  • 75
    posted
    Sorry for not using fresh lines but somehow the editor bunched my text together

    Update: Apparently i had to type it in html for it to keep the formatting -_-