Dynamic grouping on columns with null values

1 posts, 0 answers
  1. John
    John avatar
    40 posts
    Member since:
    Jun 2010

    Posted 14 Feb 2017 Link to this post

    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")




Back to Top