Do you have any idea how to clone a row? I'm using a grid with a TemplateAddRow and I'd like all the values to be filled in the cells of the TemplateAddRow. This is no problem, but when I manipulate the cells in this row by code, the Cell.Modified property of all the cells in this row is set to false, which causes problems in my further data-processing.
Any hint would be appreciated.
Regards, Florian
Hi Florian,
I'm not sure I follow your question. You are saying that when you modify the value of the cell, the cell.Modified property is false? That seems odd, but my guess is that Modified means modified by the user.
Why does this cause a problem? Is it because the grid doesn't consider the template modified by the user, so the row will not be made into a "real" row unless the user modifies it? If that's the case, you can set AddRowModifiedByUser (on the Rows collection) to true.
Hi Mike!
Mike Saltzman"]Why does this cause a problem? Is it because the grid doesn't consider the template modified by the user, so the row will not be made into a "real" row unless the user modifies it? If that's the case, you can set AddRowModifiedByUser (on the Rows collection) to true.
But thanks to your help, I was able to solve my problem.
If anyone is interested, here are the necessary steps:
UltraGridRow row = UltraGridUsedByComponent.Rows.TemplateAddRow; row.Activate();
[...] //modify all cells
UltraGridUsedByComponent.Rows.AddRowModifiedByUser = true;
Without calling row.Activate() of the template-add-row, not any of the cells change its DataChanged-property, when changing its value. I don't know, if this cell behaviour is wanted. @Mike: do you have information about this?