PC Review


Reply
Thread Tools Rate Thread

Remove last raw on dataGrid

 
 
Chi Tang
Guest
Posts: n/a
 
      25th Jun 2003
Hi,

Does anybody know how to remove the last raw on a dataGrid control on a
Windows form? This raw is empty with a star sign on the first column. When
I click it some data become null. Thanks for any help,

CT


 
Reply With Quote
 
 
 
 
Dmitriy Lapshin
Guest
Posts: n/a
 
      26th Jun 2003
Hi Chi,

You can disable this row by doing the following:

CurrencyManager cm = (CurrencyManager)dataGrid.BoundContext[
dataGrid.DataSource,
dataGrid.DataMember];

DataView theView = (DataView)cm.List;
theView.AllowNew = false;

This code should be executed right after the grid has been bound to a data
source.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Unit Testing and Integration Environment
http://x-unity.miik.com.ua
Deliver reliable .NET software

"Chi Tang" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> Does anybody know how to remove the last raw on a dataGrid control on a
> Windows form? This raw is empty with a star sign on the first column.

When
> I click it some data become null. Thanks for any help,
>
> CT
>
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
remove highlighting from datagrid row =?Utf-8?B?Um9iZXJ0IFNtaXRo?= Microsoft VB .NET 0 21st Sep 2005 09:36 PM
Remove Detail in Datagrid, Agnes Microsoft VB .NET 1 23rd Jun 2005 06:41 AM
Remove datagrid scrollbars Rob Oldfield Microsoft Dot NET Framework Forms 0 23rd Jan 2005 06:59 PM
Remove row from datagrid dynamicly moondaddy Microsoft ASP .NET 3 30th Jun 2004 05:21 PM
DataGrid Refersh to remove previous data. remove current selection Jawahar Rajan Microsoft Dot NET 0 17th Feb 2004 02:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:54 PM.