Datagrid: prevent new row at bottom

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

Hello -

Is there a way to prevent the user from creating a blank row at the
bottom of a datagrid? I want a read only grid that allows the user to
view data but not select specific cells or create a blank row, etc.

Thanks,
Brian
 
Hello Brian,

if you are working with datasets/datatables, you can do this by using a
DataView component. You just need to set the DataView.Table property to the
DataSet table you're working with, then bind the DataGrid control to that
DataView. The DataView exposes a number of properties that you can set to
tell the DataGrid control how to behave (AllowNew, AllowEdit, AllowDelete,
etc.).

HTH

Antoine
Microsoft Visual Basic .NET

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
Back
Top