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
165
How to programmatically update an cell beside an editing cell
posted

Hi experts,

The problem is like this, i have a ultragrid bound to a data class. there are 3 columns A , B and C in this grid. Columns A and B are editable while C is readonly. there is a relationship between them C = A + B. So after user input new value into A or B, the column C need to be updated immdiately.

i had tried lots of methods like update data class or cell C UI in AfterCellUpdate event handler but failed, could any body give any hints? thanks.

xiaolong  

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted


            private void ultraGrid1_InitializeRow(object sender, InitializeRowEventArgs e)
            {
                e.Row.Cells["C"].Value = (int)e.Row.GetCellValue("A") + (int)e.Row.GetCellValue("B");
            }

Children
No Data