dt.Load(rs)
RadGrid1.HeaderStyle.VerticalAlign = VerticalAlign.Middle
RadGrid1.HeaderStyle.HorizontalAlign = HorizontalAlign.Center
RadGrid1.Width = 868
RadGrid1.MasterTableView.Width = UnitType.Pixel
RadGrid1.MasterTableView.Width = 868
RadGrid1.MasterTableView.Height = UnitType.Percentage
RadGrid1.MasterTableView.Height = 100
RadGrid1.ClientSettings.Resizing.AllowColumnResize =
True
RadGrid1.ExportSettings.ExportOnlyData =
True
RadGrid1.ExportSettings.IgnorePaging =
True
RadGrid1.DataSource = dt
RadGrid1.AllowPaging =
True
RadGrid1.AutoGenerateColumns =
True
RadGrid1.AllowSorting =
True
RadGrid1.Height = 768
RadGrid1.ClientSettings.Resizing.ClipCellContentOnResize =
False
Dim
expression As GridGroupByExpression = New GridGroupByExpression
Dim gridGroupByField As GridGroupByField = New GridGroupByField
gridGroupByField =
New GridGroupByField
gridGroupByField.FieldName =
"section"
gridGroupByField.HeaderText =
"Total for Section "
expression.SelectFields.Add(gridGroupByField)
expression.GroupByFields.Add(gridGroupByField)
RadGrid1.MasterTableView.GroupByExpressions.Add(expression)
RadGrid1.MasterTableView.TableLayout = GridTableLayout.Fixed
RadGrid1.ClientSettings.Scrolling.AllowScroll =
True
RadGrid1.ClientSettings.Scrolling.UseStaticHeaders =
True
Dim item As GridItem
RadGrid1.Rebind()
For Each item In RadGrid1.MasterTableView.Controls(0).Controls
If TypeOf item Is GridGroupHeaderItem Then
item.Expanded =
False
End If
Next
for example
if i have a column section with
apple
apple
pear fruit
strawberry
peanut butter
peanut butter,
i only get apple and pear fruit back. why is this the problem? i know i get all of the databack because if i go to the next page, it will show up the strawberry and peanut butter. and so i put a break point in the line item.expand = false, i noticed that only a few items get into that loop not all. mostly the first two. can you help me ? Thank you for your help.