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
3455
Null exception
posted

Hi,

While running this code, get null exception some times,

foreach (UltraGridRow ugr in this.UltraGrid1.Rows)

{

if (ugr.Selected)

ugr.Cells["Select"].Value = true;

else

ugr.Cells["Select"].Value = false;

}

 

Can anyone suggest any other method to set the column value.

regards,

pgr2007

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Okay, that makes sense. When you group the grid using OutlookGroupB, the root level rows of the grid are no longer data rows, they are groupby rows and (as you can see) they don't have any cells. 

    What you probably want to do is is use grid.Rows.GetFilteredInNonGroupByRows or GetAllNonGroupByRows, instead of just grid.Rows.

Children