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
695
error when ultragrid.rows(0).IsGroupByRow = True
posted

when  ultragrid1.rows(0).IsGroupByRow = True  then  i get the error Cannot set Column 'XYZ' to be null. Please use DBNull instead. for the below code. and when 

ultragrid.rows(0).IsGroupByRow = false it deosnt give any error

Dim drow As DataRow = dt.NewRow()

For s = 0 To ultragrid1.Rows.Count - 1

For x = 0 To ultragrid1.DisplayLayout.Bands(ultragrid1.ActiveRow.Band.Index).Columns.Count - 1

drow(i) = IIf(IsDBNull(ultragrid1.Rows(s).GetCellValue(ultragrid1.DisplayLayout.Bands(ultragrid1.ActiveRow.Band.Index).Columns(x))) = True, _
DBNull.Value, _
ultragrid1.Rows(s).GetCellValue(ultragrid1.DisplayLayout.Bands(ultragrid1.ActiveRow.Band.Index).Columns(x)))

Next
dt.Rows.Add(drow)
Next

Thanks in advance

Parents Reply Children
No Data