HighTechTalks DotNet Forums  

Programattically setting gridview to edit mode

ASP.net Data Grid Control microsoft.public.dotnet.framework.aspnet.datagridcontrol


Discuss Programattically setting gridview to edit mode in the ASP.net Data Grid Control forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Nirmal Singh
 
Posts: n/a

Default Programattically setting gridview to edit mode - 11-02-2007 , 08:12 AM






I have a button on my form which is enabled when the user selects a record
in the datagrid (I do not want an edit button for each record in the grid).
How can I force the datagrid into edit mode when the user clicks on this
button?

Nirmal



Reply With Quote
  #2  
Old   
Joe Stateson
 
Posts: n/a

Default Re: Programattically setting gridview to edit mode - 11-05-2007 , 08:41 AM







"Nirmal Singh" <nirmal.singh (AT) notthisbittowerhamlets (DOT) gov.uk> wrote

Quote:
I have a button on my form which is enabled when the user selects a record
in the datagrid (I do not want an edit button for each record in the grid).
How can I force the datagrid into edit mode when the user clicks on this
button?

Nirmal
Unfortunately, I see no one has answered this. I would have like to do
something very similar: Create a "new" row in the gridview, then select
(position) on that new row and go into edit mode. This would give me a
simple way to create a new row in the database.


--
================================================== ====================
Joseph "Beemer Biker" Stateson
http://TipsForTheComputingImpaired.com
http://ResearchRiders.org Ask about my 99'R1100RT
================================================== ====================



Reply With Quote
  #3  
Old   
Paul Bicknell
 
Posts: n/a

Default Re: Programattically setting gridview to edit mode - 11-05-2007 , 04:48 PM



To force the grid control into Edit mode, use the ChangeMode function like
this:-

GridView.ChangeMode(GridViewMode.Edit)

Regards,

Paul

"Nirmal Singh" <nirmal.singh (AT) notthisbittowerhamlets (DOT) gov.uk> wrote

Quote:
I have a button on my form which is enabled when the user selects a record
in the datagrid (I do not want an edit button for each record in the grid).
How can I force the datagrid into edit mode when the user clicks on this
button?

Nirmal




Reply With Quote
  #4  
Old   
Joe Stateson
 
Posts: n/a

Default Re: Programattically setting gridview to edit mode - 11-07-2007 , 09:25 AM




"Paul Bicknell" <bicknell.paul (AT) virgin (DOT) net> wrote

Quote:
To force the grid control into Edit mode, use the ChangeMode function like
this:-

GridView.ChangeMode(GridViewMode.Edit)
unfortunately, that ChangeMode method only works in DetailsView, not
GridView, but it is a nice thing to know anyway.


Quote:
Regards,

Paul

"Nirmal Singh" <nirmal.singh (AT) notthisbittowerhamlets (DOT) gov.uk> wrote in
message news:ut9BLIVHIHA.3916 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
I have a button on my form which is enabled when the user selects a record
in the datagrid (I do not want an edit button for each record in the
grid). How can I force the datagrid into edit mode when the user clicks on
this button?

Nirmal





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.