Datagrid - preventing the user from adding rows

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I've an app which has a datagrid embedded, but whenever the user navigates
to the last row & presses the down arrow (or clicks with the mouse just below
the last row), I see an additional row added, full of nulls. Is there an easy
way to prevent this extra row?

Cheers
 
Neil said:
Hi,

I've an app which has a datagrid embedded, but whenever the user navigates
to the last row & presses the down arrow (or clicks with the mouse just below
the last row), I see an additional row added, full of nulls. Is there an easy
way to prevent this extra row?

Cheers


You need to add your datatable to a dataview object. Then set the
DataView.AllowNew = False. Then bind the dataview to your datagrid.

Hope this helps.
Chris
 
Back
Top