Hello Everyone
I have to Remove Pencil Image in UltraGrid which is visible when column in grid is updated. Is there any property in UltraGrid to set in order to get rid of this pencil image while updating.
The pencil icon indicates that the row has pending changes that need to be written to the grid's DataSource.
So are you asking how to hide this icon wihout committing the changes? Or do you want to commit the changes?
The former doesn't really make any sense. So your question is probably how to commit the changes. The answer to that is to call Update on the row (to commit a single row) or UpdateData on the grid (to commit all rows).
i called the grid.updatedata and it didnt work.
shao said:i called the grid.updatedata and it didnt work.
Can you provide more information or a sample project showing this not working?
The method itself definitely works, although if a row is still in edit mode, it might not commit the changes for that row. You might have exit edit mode first.
But without knowing what you are doing or when you are calling the method, it's impossible to know why it didn't work.
Hi Philip,
Your code is correct, but the DataChangedImage probably isn't what you want. This image only applies to a row that has pending changes and is NOT the active row. This almost never happens, since the changes are committed as soon as the row is deactivated. The only way this would come up is if you edit a cell value in code for a row that it not active.
Anyway, you probably want something like this:
Private Sub UltraGrid1_InitializeLayout(sender As System.Object, e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraGrid1.InitializeLayout e.Layout.RowSelectorImages.DataChangedImage = Nothing e.Layout.RowSelectorImages.ActiveAndDataChangedImage = Nothing End Sub
If that doesn't work, then my best guess is something else in your application is overriding it or blowing away these property settings. For example, if you do this and then load a saved layout, the layout will restore the original images.
Hi Mike. This hasn't helped me in vb.net? layout.RowSelectorImages.DataChangedImage = nothing.
Any chance you could help, I just don't like those pencils and would like to get rid of them, thanks
Thanks a lot Mike, Your solution was too useful for me.
Thanks Mike! I works fine :-)
All of the images that appear in the row selectors are settable. To blank out one of them completely, just set it to null.
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; layout.RowSelectorImages.DataChangedImage = null; }