Home All Groups Group Topic Archive Search About

DataGrid, Edit and the Enter Key

Author
13 Jan 2006 1:32 PM
Newbie
Hi Everyone,

ASP.NET  1.x

I have a problemette !

I have a datagrid on my web form. When the user hits the enter key whilst
any editable field on the form including those in the datagrid itself, it
triggers a submit back to the server.

A the least, I want to disable this and at best, I want to know if I can
trap the enter key for the currently being edited row on the datagrid to
force and update event of that line.

Can anyone help ?

Author
13 Jan 2006 2:34 PM
S. Justin Gengo [MCP]
Newbie,

I have a javascript component on my website and one of the scripts is used
to trap the enter key while in a textbox and click the button of your
choice. It will be a bit more difficult to do in a datagrid since you'll
have to use the OnItemDatabound event to hook up the script properly. The
component is free and comes with all source code. For your use I would
suggest stripping out just the code you need and using it as an example.
Also in my code library if you do a search for "Clickable Datagrid" I have
an example of how to make a datagrid row clickable for selecting it. You
won't need that, but it does show how to hook up a javascript to the
datagrid's select button from within OnItemDatabound. That example should be
helpful for doing this. You may find a demo and link to download the
javascript component here: http://www.aboutfortunate.com?page=javascriptdemo


--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
                            Nietzsche
Show quoteHide quote
"Newbie" <m*@me.com> wrote in message
news:ObWR%23WEGGHA.3864@tk2msftngp13.phx.gbl...
> Hi Everyone,
>
> ASP.NET  1.x
>
> I have a problemette !
>
> I have a datagrid on my web form. When the user hits the enter key whilst
> any editable field on the form including those in the datagrid itself, it
> triggers a submit back to the server.
>
> A the least, I want to disable this and at best, I want to know if I can
> trap the enter key for the currently being edited row on the datagrid to
> force and update event of that line.
>
> Can anyone help ?
>
>
>
>
>
>
Are all your drivers up to date? click for free checkup

Author
13 Jan 2006 3:36 PM
Newbie
Thanks a lot Justin, I will have a go at this next Monday when Im back at
work


Show quoteHide quote
"S. Justin Gengo [MCP]" <justin@[no_spam_please]aboutfortunate.com> wrote in
message news:OZIV15EGGHA.2040@TK2MSFTNGP14.phx.gbl...
> Newbie,
>
> I have a javascript component on my website and one of the scripts is used
> to trap the enter key while in a textbox and click the button of your
> choice. It will be a bit more difficult to do in a datagrid since you'll
> have to use the OnItemDatabound event to hook up the script properly. The
> component is free and comes with all source code. For your use I would
> suggest stripping out just the code you need and using it as an example.
> Also in my code library if you do a search for "Clickable Datagrid" I have
> an example of how to make a datagrid row clickable for selecting it. You
> won't need that, but it does show how to hook up a javascript to the
> datagrid's select button from within OnItemDatabound. That example should
> be helpful for doing this. You may find a demo and link to download the
> javascript component here:
> http://www.aboutfortunate.com?page=javascriptdemo
>
>
> --
> Sincerely,
>
> S. Justin Gengo, MCP
> Web Developer / Programmer
>
> www.aboutfortunate.com
>
> "Out of chaos comes order."
>                            Nietzsche
> "Newbie" <m*@me.com> wrote in message
> news:ObWR%23WEGGHA.3864@tk2msftngp13.phx.gbl...
>> Hi Everyone,
>>
>> ASP.NET  1.x
>>
>> I have a problemette !
>>
>> I have a datagrid on my web form. When the user hits the enter key whilst
>> any editable field on the form including those in the datagrid itself, it
>> triggers a submit back to the server.
>>
>> A the least, I want to disable this and at best, I want to know if I can
>> trap the enter key for the currently being edited row on the datagrid to
>> force and update event of that line.
>>
>> Can anyone help ?
>>
>>
>>
>>
>>
>>
>
>
Author
13 Jan 2006 8:48 PM
S. Justin Gengo [MCP]
Newbie,

If you have any questions feel free to email me.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
                            Nietzsche
Show quoteHide quote
"Newbie" <m*@me.com> wrote in message
news:%235HtvcFGGHA.2064@TK2MSFTNGP09.phx.gbl...
> Thanks a lot Justin, I will have a go at this next Monday when Im back at
> work
>
>
> "S. Justin Gengo [MCP]" <justin@[no_spam_please]aboutfortunate.com> wrote
> in message news:OZIV15EGGHA.2040@TK2MSFTNGP14.phx.gbl...
>> Newbie,
>>
>> I have a javascript component on my website and one of the scripts is
>> used to trap the enter key while in a textbox and click the button of
>> your choice. It will be a bit more difficult to do in a datagrid since
>> you'll have to use the OnItemDatabound event to hook up the script
>> properly. The component is free and comes with all source code. For your
>> use I would suggest stripping out just the code you need and using it as
>> an example. Also in my code library if you do a search for "Clickable
>> Datagrid" I have an example of how to make a datagrid row clickable for
>> selecting it. You won't need that, but it does show how to hook up a
>> javascript to the datagrid's select button from within OnItemDatabound.
>> That example should be helpful for doing this. You may find a demo and
>> link to download the javascript component here:
>> http://www.aboutfortunate.com?page=javascriptdemo
>>
>>
>> --
>> Sincerely,
>>
>> S. Justin Gengo, MCP
>> Web Developer / Programmer
>>
>> www.aboutfortunate.com
>>
>> "Out of chaos comes order."
>>                            Nietzsche
>> "Newbie" <m*@me.com> wrote in message
>> news:ObWR%23WEGGHA.3864@tk2msftngp13.phx.gbl...
>>> Hi Everyone,
>>>
>>> ASP.NET  1.x
>>>
>>> I have a problemette !
>>>
>>> I have a datagrid on my web form. When the user hits the enter key
>>> whilst any editable field on the form including those in the datagrid
>>> itself, it triggers a submit back to the server.
>>>
>>> A the least, I want to disable this and at best, I want to know if I can
>>> trap the enter key for the currently being edited row on the datagrid to
>>> force and update event of that line.
>>>
>>> Can anyone help ?
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
Author
16 Jan 2006 11:54 AM
Newbie
I have a different question regarding user controls which I have just posted
to the group, if you wouldnt mind taking a look at that I would appriciate
it.

Thanks


Show quoteHide quote
"S. Justin Gengo [MCP]" <justin@[no_spam_please]aboutfortunate.com> wrote in
message news:eDxq2KIGGHA.3864@tk2msftngp13.phx.gbl...
> Newbie,
>
> If you have any questions feel free to email me.
>
> --
> Sincerely,
>
> S. Justin Gengo, MCP
> Web Developer / Programmer
>
> www.aboutfortunate.com
>
> "Out of chaos comes order."
>                            Nietzsche
> "Newbie" <m*@me.com> wrote in message
> news:%235HtvcFGGHA.2064@TK2MSFTNGP09.phx.gbl...
>> Thanks a lot Justin, I will have a go at this next Monday when Im back at
>> work
>>
>>
>> "S. Justin Gengo [MCP]" <justin@[no_spam_please]aboutfortunate.com> wrote
>> in message news:OZIV15EGGHA.2040@TK2MSFTNGP14.phx.gbl...
>>> Newbie,
>>>
>>> I have a javascript component on my website and one of the scripts is
>>> used to trap the enter key while in a textbox and click the button of
>>> your choice. It will be a bit more difficult to do in a datagrid since
>>> you'll have to use the OnItemDatabound event to hook up the script
>>> properly. The component is free and comes with all source code. For your
>>> use I would suggest stripping out just the code you need and using it as
>>> an example. Also in my code library if you do a search for "Clickable
>>> Datagrid" I have an example of how to make a datagrid row clickable for
>>> selecting it. You won't need that, but it does show how to hook up a
>>> javascript to the datagrid's select button from within OnItemDatabound.
>>> That example should be helpful for doing this. You may find a demo and
>>> link to download the javascript component here:
>>> http://www.aboutfortunate.com?page=javascriptdemo
>>>
>>>
>>> --
>>> Sincerely,
>>>
>>> S. Justin Gengo, MCP
>>> Web Developer / Programmer
>>>
>>> www.aboutfortunate.com
>>>
>>> "Out of chaos comes order."
>>>                            Nietzsche
>>> "Newbie" <m*@me.com> wrote in message
>>> news:ObWR%23WEGGHA.3864@tk2msftngp13.phx.gbl...
>>>> Hi Everyone,
>>>>
>>>> ASP.NET  1.x
>>>>
>>>> I have a problemette !
>>>>
>>>> I have a datagrid on my web form. When the user hits the enter key
>>>> whilst any editable field on the form including those in the datagrid
>>>> itself, it triggers a submit back to the server.
>>>>
>>>> A the least, I want to disable this and at best, I want to know if I
>>>> can trap the enter key for the currently being edited row on the
>>>> datagrid to force and update event of that line.
>>>>
>>>> Can anyone help ?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>

Bookmark and Share