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
385
Cell Updates and TemplateRows / AddRows working inconsistently
posted

Problem:
When entering values in the template row, the values are inconsistently updated
between the added row and template row.

Details:
We write into the first cell of a template row. Automatically a new AddRow is added
and the templateRow is moved down one row. When we enter the first values in the AddRow cells, the template
row automatically takes the same values. However, when we edit the values a second time, the values
are not updated to the template row anymore.

Context:
We are using UltraGrid with TemplateRows. When setting up the grid, we set up an editor for
each cell.

[inside a UltraGrid inherited class, during the onInitializeTemplateAddRow() method]
cellEditor = ((IProvidesEmbeddableEditor)control).Editor;
row.Cells[gridColumn].Editor = cellEditor;

We use the data binding on the Grid's data source and bind it to an object that inherits from BindingList.
When we click on a templateRow, we use the onInitialiteTemplateAddRow method to fill in default values
to the template row. 

Hint:
We could see that the templateRow cell values and the addRow cells values refer to the same object initially but that after editing the first cell, they are suddenly not the same object anymore. This may explain the inconsistent behaviour.

Parents
No Data
Reply Children