473,782 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

set focus after cancelling edit in gridview

Hi,

I have a gridview with edit option. If the user chooses to edit the
row and then press the Cancel button - I would like the focus to
return to the chosen row.

Someone has any idea how to implement it?

Thanks.
Regards,

Ruthie.

Jun 10 '07 #1
2 2548
ruthie wrote:
Hi,

I have a gridview with edit option. If the user chooses to edit the
row and then press the Cancel button - I would like the focus to
return to the chosen row.

Someone has any idea how to implement it?
What do you mean by focus?

--

Riki
Jun 10 '07 #2
On Jun 10, 6:32 pm, "Riki" <r...@dontnagme .comwrote:
ruthie wrote:
Hi,
I have a gridview with edit option. If the user chooses to edit the
row and then press the Cancel button - I would like the focus to
return to the chosen row.
Someone has any idea how to implement it?

What do you mean by focus?

--

Riki
Hi Riki,

Lets say that the user scrolls the gridview page and presses the edit
button and
then he chooses to cancel editing. After he presses the cancel button,
the page is
regenerated and he sees now the beginning of the page - and not the
row which he chose before.
I had the same problem with the edit button - but I managed to solve
it - After the user presses the edit button, there is a
radiobuttonlist in the chosen row
(edit template) - so I use this.setFocus(c ontrolID) - but when
cancelling edit - all the rows are the same and there is no special
row.

Thanks so much.
Ruthie.

Jun 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
19328
by: Martin | last post by:
I have the following function in the onchange event of several text boxes. If the user enters an invalid number the alert displays. I would like to return the user to that same field after he closes the alert but setting the focus as I'm doing here doesn't do it (instead, the focus goes to the next field). Any suggestions as to hwo I can make this work? Thanks.
17
3863
by: Neil Ginsberg | last post by:
OK, this is a stupid thing, but I can't seem to get this to work. I have a form with a subform (in continuous form view). A combo box on the main form has code in the AfterUpdate event which adds a record to the subform (based on the value of the combo box) and requeries the subform control. I want the focus to return to the combo box on the main form when it's done, but I can't get it to do so if the user enters a value and presses Enter...
2
15646
by: ad | last post by:
I used ASP.NET 2.0. When I edit a row in a GridView. How can I set the focus to the first editable column?
1
1771
by: John A Grandy | last post by:
I'm not using SqlDataSource or ObjectDataSource. I'm handling events , similar to approach commonly used in 1.1. DataGrid. My question is : How do I configure a GridView's edit mode row format ? Here is my aspx : <asp:GridView ID="gvTasks" runat="server" AllowSorting="true" BackColor="Aqua"
3
19265
by: misiek | last post by:
Hi all. I have following problem: 1. In my web page I have a GridView control, which does not have a DataSourceId set in designer. 2. When user presses Start button then I create programatically a dataSet, set it as a DataSource for my GridView an add it to Session. 3. I want my users to be able to edit data displayed in GridView, so I added Edit command column. 4. When user clicks Edit, then I get the following error: "The GridView
3
7427
by: Joey | last post by:
asp.net 2.0 VS2005 C# In my web app I added a gridview and then manually configured boundcolumns, for an in-session dataset to act as a datasource. Then I added an Edit commandfield. When I run the page, in each row in the gridview I see the data and the Edit and Delete links just fine. But when I click an edit link, the post posts back and nothing else happens...I do not get textboxes/checkboxes for the columns in the
2
4382
by: David Ching | last post by:
I am not getting any response to my previous question on reusing a DetailsView to insert and edit the selected row in a GridView. So I'll ask an even more basic question. Newbie alert! ;) When the user clicks the Edit link in a GridView, is it common to use a DetailsView to edit that row instead of putting the GridView into Edit mode and editing the row in place? I would assume so, because the GridView does not typically have columns...
4
5862
by: foolmelon | last post by:
Before AJAX, we were able to focus a cell in a gridview during a fullpage postback. After putting the gridview inside an UpdatePanel, we cannot focus a cell in this gridview anymore. Does anybody know if it is possible to make such focus? Thanks! Bill
12
7281
by: dorandoran | last post by:
I followed this link to add new record from gridview. So far it's good but I need to modify the last piece to edit the record that I will supply the record id. http://asptutorials.net/ASP/gridview-auto-edit-blank-row/ I am using stored proc to insert a new record and returning the id. Now I can get the id in my asp.net (c$) environment. I added a label and I was able to populated the label with the newly added record's
0
9639
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10311
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10146
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10080
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8967
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6733
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5378
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5509
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3639
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.