Prevent Adding new records in DataGrid

  • Thread starter Thread starter Tor Inge Rislaa
  • Start date Start date
T

Tor Inge Rislaa

Prevent Adding new records in DataGrid



Hi I have a DataGrid that I want to open for editing but the user should not
be able to add new records. When I set the ReadOnly = False it is possible
to edit but it is also able to add new records. How do I prevent that?



TIRislaa
 
Hi,

To prevent the user from adding a new row set the
datatables.defaultview.allownew = false.

http://msdn.microsoft.com/library/d...frlrfsystemdatadataviewclassallownewtopic.asp


Ken
-------------------
Prevent Adding new records in DataGrid



Hi I have a DataGrid that I want to open for editing but the user should not
be able to add new records. When I set the ReadOnly = False it is possible
to edit but it is also able to add new records. How do I prevent that?



TIRislaa
 
Tor,

In addition to Ken, when you want to add a row yourself just set it
temporaly to true.

Cor
 

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

Back
Top