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

Re: DataGrid simple question by Tim

Tim
Mon Apr 04 14:52:53 CDT 2005

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.

--
Tim Wilson
.Net Compact Framework MVP

"Cezar" <Cezar@discussions.microsoft.com> wrote in message
news:CDF925D2-6628-464C-8373-28FAFA7A80CC@microsoft.com...
> 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
>