473,545 Members | 2,019 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use 'Enter Key' to Update a Row in GridView when in Edit mode?

9 New Member
If a User clicks the 'Update' linkbutton the row will update as expected. How can I make the row 'Update' when a User presses the 'Enter Key'?

Thanks for any info this may be something simple I am missing but it has been driving me crazy trying to get this working.
Aug 19 '08 #1
2 2562
cloud255
427 Recognized Expert Contributor
Well select the key pressed event;

then do something like

Expand|Select|Wrap|Line Numbers
  1. if(e.KeyChar.Equals(Keys.Enter))
  2. {
  3.    //call the code to update here
  4. }
hope this helps
Aug 19 '08 #2
sh26
9 New Member
Would that have to be done with javascript? This is a web application.
Aug 19 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1851
by: tim.cavins | last post by:
I am trying a GridView for the first time and it seems to be something that should be EXTREMELY simple. I cannot get the Update or Cancel when trying to edit a row to work. When I click on the Edit link, the row comes up in Edit mode. That's as far as it goes. If I change a value in a textbox and click Update, the page reloads still in...
1
10385
by: Evan M. | last post by:
Here's my GridView and my SqlDataSource <asp:GridView ID="ContactHistoryGrid" runat="server" AutoGenerateColumns="False" DataSourceID="ContactHistoryDS" DataKeyNames="JobHistoryID" OnRowCreated="ContactHistoryGrid_RowCreated" CssClass="GridViewTable" GridLines="None" CellSpacing="1" CellPadding="3" AllowSorting="True" AllowPaging="True">...
2
2020
by: L.Peter | last post by:
Hi Group, I have a gridview bound to a sqldatasource, this datasource pulls data out from select and update procedures with 10 update parameters the gridview has 15 columns, in edit mode, I want to hide some columns by setting gridvew1.columns.visible = false. so users can focus on 2 editable columns only. The problem is before editing,...
3
7317
by: pvong | last post by:
VB.NET How do you change a gridview from Update mode to normal mode? I'm usually dealing for Formviews and there is a ChangeMode option but I don't see one for Gridviews.
4
6036
by: tim.cavins | last post by:
I have a GridView populated by an ObjectDataSource. I am having issues passing the parameters to the objectdatasource. I have verified that the method is being called but none of the parameters are being populated. Integers are being passed as 0 and strings are empty regardless of what I changed them to in Edit mode on the GridView. My...
0
1570
by: Don | last post by:
I have a GridView inside an UpdatePanel. This GridView has a command field (edit, update, cancel). When I click edit I go into update mode, refreshing only the GridView, as you would expect. When I click cancel or update the browser hangs. Stepping through the debugger I can see that the update code is executed when update is clicked. ...
3
21065
by: Don | last post by:
I have a detailsView that I use with a GridView. When a row is selected I show the GridView with a default mode of Edit. This shows my fields with text boxes for changing the data. It also has the update and cancel buttons. Now I need to put the DetailsView into Insert mode when a button is clicked. In the button clicked event handler,...
11
6048
by: SAL | last post by:
Hello, I have a Gridview control (.net 2.0) that I'm having trouble getting the Update button to fire any kind of event or preforming the update. The datatable is based on a join so I don't know if that's what's causing the behavior or not. It seems like the Update button should at least do something. When the Edit button is clicked, the...
15
15788
by: stefbek97 | last post by:
Hello All, I am having Trouble with a Gridview control In my asp.net/C# application. It contains Some boundFields and one checkbox field. My gridview allows Editing. It succesfully enters edit mode and when i hit update the Datasource updates but the control will not return to readonly mode. I have gone far enough to figure out the problem is...
0
7401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7423
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7757
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5329
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4945
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3450
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3443
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.