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
Hi Yale,
yalewang said:It looks like the grid.UpdateMode could be set to OnUpdate (instead of the OnRowChangeOrLostFocus default) to avoid an automatic AcceptChanges. That keeps the dirty marker on dirty rows until explicitly calling Update.
I'm not sure this will work. See this thread: UltraGrid.UpdateMode and BindingList<T> data source - Infragistics Forums
yalewang said:I have a grid using a DataSet as the DataSource. Is there a way to prevent the grid from removing the rows that're slated for deletion (dataRow.RowState == Deleted). I tried changing the DataTable's DefaultView.RowStateFilter to Current | Deleted. But that doesn't seem to be making a difference.
I don't think so. The grid has no control over this, it just displays what the BindingManager gives it, and I suspect the IBindingList implementation on DataSet/DataTable is always going to filter out deleted rows.
You could, of course, bind the grid to a data source that still contains those rows. You could, for example, copy the data into another data table or an UltraDataSource.
It looks like the grid.UpdateMode could be set to OnUpdate (instead of the OnRowChangeOrLostFocus default) to avoid an automatic AcceptChanges. That keeps the dirty marker on dirty rows until explicitly calling Update.
I have another question though.
I have a grid using a DataSet as the DataSource. Is there a way to prevent the grid from removing the rows that're slated for deletion (dataRow.RowState == Deleted). I tried changing the DataTable's DefaultView.RowStateFilter to Current | Deleted. But that doesn't seem to be making a difference.
--yale
This worked for me. Thanks Mike.
Thanks Mike.
I would explore the option of RowSelectorAppearance.Image option.
Thanks,
Raj
Hi 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.