PC Review


Reply
Thread Tools Rate Thread

DataGrid AllowNew = False

 
 
Doug Bell
Guest
Posts: n/a
 
      7th Dec 2004
Hi,
Is the only way to have a DataGrid (bound to a DataTable) disallow new
records to bind it to a DataView with its AllowNew property set to False?

Thanks

Doug


 
Reply With Quote
 
 
 
 
Chris, Master of All Things Insignificant
Guest
Posts: n/a
 
      7th Dec 2004
Yes, you have to use a DataView.

dim D as new DataView
D.Table = Table1
D.AllowNew = False
DataGrid1.DataSource = D

Have Fun
Chris

"Doug Bell" <dug@bigpond> wrote in message
news:(E-Mail Removed)...
> Hi,
> Is the only way to have a DataGrid (bound to a DataTable) disallow new
> records to bind it to a DataView with its AllowNew property set to False?
>
> Thanks
>
> Doug
>
>



 
Reply With Quote
 
Doug Bell
Guest
Posts: n/a
 
      7th Dec 2004
Chris,
Thanks, I couldn't see any other way, not that a dv is a problem but thought
that I would ask.

Doug

"Chris, Master of All Things Insignificant" <chris@No_Spam_Please.com> wrote
in message news:%23$(E-Mail Removed)...
> Yes, you have to use a DataView.
>
> dim D as new DataView
> D.Table = Table1
> D.AllowNew = False
> DataGrid1.DataSource = D
>
> Have Fun
> Chris
>
> "Doug Bell" <dug@bigpond> wrote in message
> news:(E-Mail Removed)...
> > Hi,
> > Is the only way to have a DataGrid (bound to a DataTable) disallow new
> > records to bind it to a DataView with its AllowNew property set to

False?
> >
> > Thanks
> >
> > Doug
> >
> >

>
>



 
Reply With Quote
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      8th Dec 2004
Hi,

Datatable.DefaultView.AllowNew=false

Ken
--------------------------
"Doug Bell" <dug@bigpond> wrote in message
news:(E-Mail Removed)...
Hi,
Is the only way to have a DataGrid (bound to a DataTable) disallow new
records to bind it to a DataView with its AllowNew property set to False?

Thanks

Doug



 
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 -- Hide Add New Row -- DataView AllowNew ehdoty@gmail.com Microsoft Dot NET Compact Framework 3 7th Mar 2007 08:17 PM
DataGrid, AllowNew, pasting inserts rows whitecrow Microsoft C# .NET 1 10th Jan 2006 03:00 PM
IBindingList AllowNew is FALSE!!! =?Utf-8?B?TmF0aGFuIEhvd2FyZA==?= Microsoft Dot NET Framework Forms 3 2nd Nov 2004 03:11 PM
Master-Detail datagrid[allownew = false] Agnes Microsoft VB .NET 1 17th Aug 2004 08:03 AM
DataGrid on DataViewManager, no AllowNew? Walt Borders Microsoft Dot NET Framework Forms 1 29th Jun 2004 04:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:13 PM.