PC Review


Reply
Thread Tools Rate Thread

Disable inserting (newbie)

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

how do i hide the last row of DataGrid (the one for inserting new
data), so my users can't insert new data but only update and delete?

thanks in advance,
Adriano


 
Reply With Quote
 
 
 
 
SStory
Guest
Posts: n/a
 
      6th Aug 2004
Can't remember but I think there is an AllowAdd or AllowNew property for the
datagrid.... try that... (set to false)

HTH,

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



 
Reply With Quote
 
Greg Burns
Guest
Posts: n/a
 
      6th Aug 2004
I know this C# code doesn't help much, but it might jog somebody else's
memory.

myDVM = new DataViewManager(myDS);

dgUsers.SetDataBinding(myDVM, "Users");

DataView dv = ((CurrencyManager) this.BindingContext[dgUsers.DataSource,
dgUsers.DataMember]).List as DataView;
if(dv != null)
{
dv.AllowDelete = false;
dv.AllowNew = false;
}

Seems to me you had to bind your grid to a dataview, and disable AllowNew on
the view.

Greg


"SStory" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Can't remember but I think there is an AllowAdd or AllowNew property for

the
> datagrid.... try that... (set to false)
>
> HTH,
>
> Shane
> "Adriano" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > hello,
> >
> > how do i hide the last row of DataGrid (the one for inserting new
> > data), so my users can't insert new data but only update and delete?
> >
> > thanks in advance,
> > Adriano
> >
> >

>
>



 
Reply With Quote
 
Adriano
Guest
Posts: n/a
 
      9th Aug 2004
great! dataview has that "allownew" property,

thanks all,
Adriano

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:(E-Mail Removed)...
> I know this C# code doesn't help much, but it might jog somebody else's
> memory.
>
> myDVM = new DataViewManager(myDS);
>
> dgUsers.SetDataBinding(myDVM, "Users");
>
> DataView dv = ((CurrencyManager) this.BindingContext[dgUsers.DataSource,
> dgUsers.DataMember]).List as DataView;
> if(dv != null)
> {
> dv.AllowDelete = false;
> dv.AllowNew = false;
> }
>
> Seems to me you had to bind your grid to a dataview, and disable AllowNew

on
> the view.
>
> Greg
>
>
> "SStory" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Can't remember but I think there is an AllowAdd or AllowNew property for

> the
> > datagrid.... try that... (set to false)
> >
> > HTH,
> >
> > Shane
> > "Adriano" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > hello,
> > >
> > > how do i hide the last row of DataGrid (the one for inserting new
> > > data), so my users can't insert new data 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
newbie inserting record question merrittr Microsoft ASP .NET 0 26th Jan 2008 08:38 PM
Newbie ASP.NET question: inserting data in table planetthoughtful@gmail.com Microsoft C# .NET 2 26th May 2006 07:30 AM
Newbie Alert: Inserting web controls dynamically RSH Microsoft VB .NET 0 27th Apr 2006 02:11 PM
Excel newbie question about auto inserting date aznick Microsoft Excel Discussion 6 25th Oct 2005 12:30 PM
Newbie question about inserting data Mika M Microsoft ADO .NET 6 7th Apr 2004 04:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:41 AM.