Home All Groups Group Topic Archive Search About

Programattically setting gridview to edit mode

Author
2 Nov 2007 1:12 PM
Nirmal Singh
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

Author
5 Nov 2007 2:41 PM
Joe Stateson
"Nirmal Singh" <nirmal.si***@notthisbittowerhamlets.gov.uk> wrote in message
news:ut9BLIVHIHA.3916@TK2MSFTNGP02.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

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
======================================================================
Author
5 Nov 2007 10:48 PM
Paul Bicknell
To force the grid control into Edit mode, use the ChangeMode function like
this:-

GridView.ChangeMode(GridViewMode.Edit)

Regards,

Paul

Show quoteHide quote
"Nirmal Singh" <nirmal.si***@notthisbittowerhamlets.gov.uk> wrote in message
news:ut9BLIVHIHA.3916@TK2MSFTNGP02.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
>
Author
7 Nov 2007 3:25 PM
Joe Stateson
"Paul Bicknell" <bicknell.p***@virgin.net> wrote in message
news:m5NXi.19133$6v.12854@newsfe2-gui.ntli.net...
> 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.


Show quoteHide quote
> Regards,
>
> Paul
>
> "Nirmal Singh" <nirmal.si***@notthisbittowerhamlets.gov.uk> wrote in
> message news:ut9BLIVHIHA.3916@TK2MSFTNGP02.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
>>
>
>