Hi,
i use Ultra Grid to load my data, after binding the grid to datatable, i add a image to one of the column.
when the grid shows in the form it is shown with the pensil mark in each row, this gives a meaning that every row is selected.
Please let me know how to remove thsi pensil mark that is the edit mark.
Correction in my question.
i use Ultra Grid to load my data, after binding the datatable to grid, i add a image to one of the column in ultragrid.
when the grid shows in the form it is shown with the pensil mark in each row, this gives a meaning that every row is EDITED.
Hi Sailash,
The pencil icon is an indicator that one or more cell values have been modified in the row. You can call row.Update method to commit the modifications. There's also UpdateData method on the UltraGrid that will do it for all rows in the grid.
Sandip
Thanks for the quick response Mike.
I have an event handler for AfterCellUpdate, where i do row validation with respect to the user changes. Is this causing this behavior? I do not explicitly update the row or do a updatedata. When user makes a change and moves out of the row (selects a different row), the pencil disappears on the row.
Thanks,
Raj
Hi Raj,
Oh, okay, you left out that that the user was moving to another row. There's no way to keep the row in edit mode once another row gets focus. The DotNet BindingManager implicitly calls an EndEdit once the position of the CurrencyManager is changed.
Thanks Mike. Now my next question is how i can mark and show the row as edited by user or the row dirty. Is there any direct way or i need to write some plumbing code to change the row color when the user edits it. Thanks,Raj
It depends what you mean, exactly. You can mark the row dirty by changing a value in a cell. So I guess one way to do this would be to change a Value of a cell and then change it back. That's kind've ugly, though.
It would probably be better to just use the InitializeRow event and color the row or use the row's RowSelectorAppearance.Image.
Thanks Mike.
I would explore the option of RowSelectorAppearance.Image option.
This worked for me. Thanks Mike.