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
947
Set a Cell Value or Clear a Cell Value Manually
posted

I am manually setting a value of a cell by the following way:

foreach (UltraGridRow gridRow in Grid.Rows)

{

gridRow.Cells[ColumnName].Value = "Test";

}

However, when I tried to change the value or clear by the same method, the original value is maintained. Isn't this allowed? Or, why setting it works, but not afterwards?

(I have the grid bound to BindingList, and the above column indicated by "ColumnName" is added manually at run-time with the following code. Isn't this correct?)

Grid.DisplayLayout.Bands[0].Columns.Add(ColumnName);

Grid.DisplayLayout.Bands[0].Columns[ColumnName].Hidden = true;

 

Parents
  • 469350
    Offline posted

    I'm not sure I understand your question. You are saying that this code just has no effect? I don't see how that's possible. Perhaps your code is re-setting the value of the cell back to the original value somewhere else, like in the InitializeRow event? 

Reply Children
No Data