DataGrid simple question

G

Guest

It is probably a very simple question, but I can't find a right DataGrid
property that prevents the user from adding new rows. Of course the
'ReadOnly' property does it, but the grid cannot be read only, since the user
should be allowed to edit existing rows.
However, when I leave ReadOnly set to false, that an empty row is appearing
on the bottom of the grid so that the user can add new rows, which is what I
don't want.
Thanks
Cezar Mart
 
T

Tim Wilson

It's a property on the DataView. When you assign to the DataSource of the
DataGrid, use a DataView object and set its AllowNew property to false.
 

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