|
-
March 3rd, 2006, 06:42 AM
#1
How to remove or hide a Last rows of DataGrid in c#?
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
-
March 3rd, 2006, 07:42 AM
#2
Re: How to remove or hide a Last rows of DataGrid in c#?
you can set the property of grid 'Read Only' then it will not show the last row of the gird.
-
March 3rd, 2006, 08:54 AM
#3
Re: How to remove or hide a Last rows of DataGrid in c#?
Or you have to bind a collection to the datagrid instead of a dataset.
Useful or not? Rate my posting. Thanks.
-
March 3rd, 2006, 11:47 AM
#4
Re: How to remove or hide a Last rows of DataGrid in c#?
-
March 3rd, 2006, 12:06 PM
#5
Re: How to remove or hide a Last rows of DataGrid in c#?
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:
Code:
DataView dv = new DataView(yourDataTable);
dv.AllowNew = false;
yourGrid.DataSource = dv;
-
March 5th, 2006, 11:47 PM
#6
Re: How to remove or hide a Last rows of DataGrid in c#?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|