We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

FAQ: 5.5 How do I prevent the datagrid from displaying its append row

Thread ID:

Created:

Updated:

Platform:

Replies:

2314 Jan 5,2003 01:44 PM UTC Jan 19,2004 08:22 PM UTC Windows Forms 7
loading
Tags: FAQ
Jerry Boutot
Asked On January 5, 2003 01:44 PM UTC

Can anybody translate the C# code to VB.NET in this article? I translated it as such: Dim cm As CurrencyManager = Me.BindingContext(Me.DataGrid1.DataSource, Me.DataGrid1.DataMember) Dim dv As DataView = cm.List dv.AllowNew = False but when I run the form, the Append row still appears. Please send your response via email to jerry@appdataworks.com as well.

Iulian Ionescu
Replied On January 5, 2003 09:02 PM UTC

I do it like this, where ME is the datagrid: Dim dv As DataView dv = CType(Me.DataSource, DataView) dv.AllowNew = False > Can anybody translate the C# code to VB.NET in this article? I translated it as such: > > Dim cm As CurrencyManager = Me.BindingContext(Me.DataGrid1.DataSource, Me.DataGrid1.DataMember) > > Dim dv As DataView = cm.List > > dv.AllowNew = False > > but when I run the form, the Append row still appears. > > Please send your response via email to jerry@appdataworks.com as well.

Isha
Replied On March 12, 2003 03:27 AM UTC

U can use the following code i) If the datasource is a data table then, dgrd.DataSource.DefaultView.AllowNew = False (dgrd is the Datagrid) ii) If the datasource is a data set then, dgrd.DataMember.DefaultView.AllowNew = False (dgrd is the Datagrid) iii) or u can directly set it as follows objDataTable.DefaultView.AllowNew = False (objDataTable is the table being displayed on the grid) > Can anybody translate the C# code to VB.NET in this article? I translated it as such: > > Dim cm As CurrencyManager = Me.BindingContext(Me.DataGrid1.DataSource, Me.DataGrid1.DataMember) > > Dim dv As DataView = cm.List > > dv.AllowNew = False > > but when I run the form, the Append row still appears. > > Please send your response via email to jerry@appdataworks.com as well.

ja
Replied On September 5, 2003 06:29 PM UTC

Ninguno funciona... :-(

Johnny Nguyen
Replied On September 5, 2003 07:52 PM UTC

I have a master-details datagrid with relations. And I tried all the method below (in VB.NET) and it did NOT seem to work. Can someone show how to make it work with Master-detail grid. Thanks in Advance > Can anybody translate the C# code to VB.NET in this article? I translated it as such: > > Dim cm As CurrencyManager = Me.BindingContext(Me.DataGrid1.DataSource, Me.DataGrid1.DataMember) > > Dim dv As DataView = cm.List > > dv.AllowNew = False > > but when I run the form, the Append row still appears. > > Please send your response via email to jerry@appdataworks.com as well.

Johnny Nguyen
Replied On September 8, 2003 03:40 PM UTC

I have a master-details datagrid with a single relations. I can make it work for the master grid BUT I can NOT make it works for the details grid. Can someone show me how to make it work for the detail grid. Thanks in Advance > > > > > Can anybody translate the C# code to VB.NET in this article? I translated it as such: > > > > Dim cm As CurrencyManager = Me.BindingContext(Me.DataGrid1.DataSource, Me.DataGrid1.DataMember) > > > > Dim dv As DataView = cm.List > > > > dv.AllowNew = False > > > > but when I run the form, the Append row still appears. > > > > Please send your response via email to jerry@appdataworks.com as well. >

Maddus
Replied On October 20, 2003 10:37 AM UTC

The defaultview works,.. myDataTable.DefaultView.AllowNew = False myDataGrid.DataSource = myDataTable Greetings

Mathieu
Replied On January 19, 2004 08:22 PM UTC

Where can i get this article? Am trying to do just this... in C# > Can anybody translate the C# code to VB.NET in this article? I translated it as such: > > Dim cm As CurrencyManager = Me.BindingContext(Me.DataGrid1.DataSource, Me.DataGrid1.DataMember) > > Dim dv As DataView = cm.List > > dv.AllowNew = False > > but when I run the form, the Append row still appears. > > Please send your response via email to jerry@appdataworks.com as well.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;