RejectChanges does not work when DataGrid ReadOnly = True

D

Dunster

Hi,

I have noticed that RejectChanges on a DataTable bound to a DataGrid feature
does not work when the DataGrid ReadOnly = True.

Here's what I'm doing. Instead of using the editing features of the DataGrid
I detect a double click on a selected row and change the data in the bound
DataTable by collecting the data with dialog boxes and changing the
DataTable with code. I also allow the DataRows to be deleted with a
toolbar/menu item. This way I can keep the ReadOnly flag True and this
prevents confusing the application's users with editing fields on the
DataGrid itself. This seemed like a good strategy and was working well.

However, I've found that setting a DataGrid ReadOnly=True prevents the
RejectChanges feature frow working at all on the bound DataTable.

Has anyone seen this before? Would there be a work around that might be
simple. Otherwise I have to implement my own AcceptChanges/RejectChanges
feature to let the user rollback changes to any tables that get bound to a
ReadOnly DataGrid.

Perhaps I have to keep the DataGrid ReadOnly = false and write code to stop
the user from being able to edit the data on the DataGrid.

Thanks for any advice or suggestions.

Dunster
 
K

Kathleen Dollard

Dunster,

I have not heard about this.

Did you search the KB?

Can you repro it in a very small sample (as small as shows the problem)? If
you post that it can be submitted as a bug.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top