PC Review


Reply
Thread Tools Rate Thread

Datagrid question (newbie)

 
 
Adriano
Guest
Posts: n/a
 
      6th Aug 2004
hello,

what's the way to hide the last row of DataGrid (the one for inserting new
data),
so my users can't insert newdata but only update and delete?

thanks in advance,
Adriano


 
Reply With Quote
 
 
 
 
ClayB [Syncfusion]
Guest
Posts: n/a
 
      6th Aug 2004
The DataView associated with the DataGrid's datasource has a AllowNew
property that you can set. If the grid's datasource is a dataview, you can
set it directly on your dataview. But if you datasource is a
dataset/datatable, you need to do a little more work to get at the DataView
being used through the CurrencyManger object.

Dim cm as CurrencyManager =
CType(Me.DataGrid1.BindingContext(Me.DataGrid1.DataSource,Me.DataGrid1.DataM
ember), CurrencyManager)
Dim dv as DataView = CType(cm.List, DataView)
dv.AllowNew = False

If you are using hierarchical data, see
http://www.syncfusion.com/faq/winforms/search/653.asp for a sample event
handler when you can set this property for the child grids.

==========================
Clay Burch, .NET MVP

Visit www.syncfusion.com for the coolest tools


"Adriano" <(E-Mail Removed)> wrote in message
news:u59ci$(E-Mail Removed)...
> hello,
>
> what's the way to hide the last row of DataGrid (the one for inserting new
> data),
> so my users can't insert newdata but only update and delete?
>
> thanks in advance,
> Adriano
>
>



 
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
DataGrid Question NEWBIE esebastian@esolutionsgroup.ca Microsoft Dot NET Framework Forms 1 16th Aug 2007 08:50 PM
newbie question on datagrid George Ter-Saakov Microsoft ASP .NET 7 30th May 2004 06:01 PM
newbie question on datagrid Paolol Microsoft C# .NET 2 26th Feb 2004 02:32 PM
DataGrid newbie question Andy Microsoft ADO .NET 2 4th Feb 2004 04:40 PM
Newbie question about DataGrid Mika M Microsoft ADO .NET 3 22nd Dec 2003 11:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:06 AM.