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
1170
I changed the value in a cell, but it is not updating (and other questions)
posted

I programmatically changed the value of a cell but it does not appear to be persisting. I tried UpdateData() prior to saving the bound sourcelist, but the row is not flagged as changed. How can I force this?

Also, in addition I would like to programmatically select each row in a foreach loop and not sure how to do this:

For example:

foreach (UltraGridRow row in grdStatus)
{

   // doing long-running stuff per row and would like to show a highlighted row selection on the grid

}

Finally, I would like to add an unbound progress bar in a cell that will show percent completed in the above iteration. Is this doable?

Parents
  • 3565
    Verified Answer
    posted

    1) Another option is to set your grid's updatemode property to OnCellChargeOrLostFocus. This will force updates as soon as the cell has been changed. The default mode is to wait until the user exists the row.

    2) You can select one or more rows by setting the row object's selected property to true in your loop. The only thing I see in your code is that your loop needs to be for each row in grdStatus.Rows.

    3) You can create an unbound column and add a progress bar control as the editor. All you should have to do when processing that row is grab a reference to the row's editor control.

Reply Children