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
215
UltradGridList Default value on insert based on another cell.
posted

I'm new to Ultragrid.  I'd like to string together a default value in a cell on an Ultragrid based on another value on INSERT. It works if I use the property on the designer but

I can't add the additional value.  Something like:

UltraGridList.DisplayLayout.Bands[0].Columns["YES_NO"].DefaultCellValue =  "The value for Joe is: " + choice;

I tried using something like this, but I don't know that the row will be zero.

UltraGridList.Rows[0].Cells["YES_NO"].Value = "The value for Joe is: " + choice;

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Tony,

    DefaultCellValue applies to the entire column - which means it applies to every row. There's no way to apply a DefaultCellValue to a single cell - at least not with a property.

    If I understand correctly what you are trying to do, then I think you need to use an event for this. Maybe AfterRowInsert. In this event, you could examine the row, look at it's index, and based on that, you could set the value of the "YES_NO" cell to whatever value you want.

Reply Children