Hello,
How can I evite that the user is able to put in a new line into a data grid at the end of the table?
Thanks!
Printable View
Hello,
How can I evite that the user is able to put in a new line into a data grid at the end of the table?
Thanks!
I'm answering to my own question:
Instead of doing this:
do this:Code:BusProperties.DataSource=dataTable;
Code:DataView dataView = new DataView(dataTable);
dataView.AllowNew = false;
BusProperties.DataSource=dataView;
And to make it shorter:
Code:BusProperties.DataSource=dataTable;
dataTable.DefaultView.AllowNew = true;