Click to See Complete Forum and Search --> : How to remove or hide a Last rows of DataGrid in c#?


saravanan_article
March 3rd, 2006, 05:42 AM
Hi gurus,

I think its stupid question for u people.. The problem here is by default last row will added in DataGrid like

> Col1 Col2 Col3
10 20 30
* null null null

Please the output which is shown above. and what i want is i want to remove the last(that is auto generated one.. by default it will come)..

Thanks in advance

REgards
Saravanan

joy_priyank
March 3rd, 2006, 06:42 AM
you can set the property of grid 'Read Only' then it will not show the last row of the gird.

torrud
March 3rd, 2006, 07:54 AM
Or you have to bind a collection to the datagrid instead of a dataset.

Satishpp
March 3rd, 2006, 10:47 AM
http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c44c.aspx#q653q

jhammer
March 3rd, 2006, 11:06 AM
I am assuming you are binding the DataGrid to a DataTable. If this is so, then you should use a DataView in the following way:

DataView dv = new DataView(yourDataTable);
dv.AllowNew = false;
yourGrid.DataSource = dv;

saravanan_article
March 5th, 2006, 10:47 PM
Thanks