when creating groups dynamically to a grid with template columns, the application is throwing an unhandled exception error if the groupbe by column holds null values. If the underlying data source is modified to replace null values with "" then the grid functions fine. The way its to behave the columns to be grouped by can change so I need a way to handle nulls in the application code. Does anyone have a solution for this?
Dim ex As New GridGroupByExpression()
For Each dRow As DataRow In objDS.Tables(2).Rows
Dim field1 As New GridGroupByField()
field1.FieldName = dRow("Column_Name")
field1.HeaderText = dRow("display_name")
field1.SortOrder = dRow("Sort_Order")
ex.GroupByFields.Add(field1)
ex.SelectFields.Add(field1)
Next
EditGrid.MasterTableView.GroupByExpressions.Add(ex)