Hi,
While running this code, get null exception some times,
{
ugr.Cells["Select"].Value = true;
else
}
Can anyone suggest any other method to set the column value.
regards,
pgr2007
I'm afraid it's hard to offer you any advice with so little to go on. What exactly are you trying to accomplish? When is this code called? What is null when you get the exception? Which line of code is the exception occurring on?
Thanks for the reply.
This code will be executed when a row is selected and at that time I will makes the column "Select" to true (this column is hidden in Grid).
The null exception occur due to ugr.Cells is null and this is not always null.
The sequence it comes null
1. when the columns are grouped like in outlook ( this.UltraGrid1.DisplayLayout.Bands[0].SortedColumns.Count>0 ) and selects a row. 2. if the user first clicks the header (column header) of the grid and then selects a row.
1. when the columns are grouped like in outlook ( this.UltraGrid1.DisplayLayout.Bands[0].SortedColumns.Count>0 ) and selects a row.
2. if the user first clicks the header (column header) of the grid and then selects a row.