|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DataGrid, Edit and the Enter KeyHi 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 ? 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 -- Show quoteHide quoteSincerely, 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 ? > > > > > > 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 ? >> >> >> >> >> >> > > Newbie,
If you have any questions feel free to email me. -- Show quoteHide quoteSincerely, 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 ? >>> >>> >>> >>> >>> >>> >> >> > > 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 ? >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >> >> > >
Other interesting topics
global functions?
Basic question about database connection in ASP.NET Why so much trouble with ellipses? reference to a "global" variable from within an aspx page 3-Tier Binding Problem ????????? Common functionality across pages, what's the best solution? Asp.net 2.0 caching and images ASP.NET Embedded Resources Very Strange Problem! (Derived Controls) - Help! Architectural assistance needed! |
|||||||||||||||||||||||