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 valuesto 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.
Hi,
we did a code refactoring and put all the grid events into an internal model. Now, the problem disappeared. It must have been that multiple events were thrown and data was bound multiple times.
Best regards,
Reto
I'm afraid I am having a hard time understanding the issue. Can you explain what the problem is in more detail?