473,378 Members | 1,470 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to focus a cell of a gridview inside an UpdatePanel (AJAX)

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
Jun 27 '08 #1
4 5829
Hello Bill,

I could not really understand, how you want to have focus in the cell of the
Grid. You can access the cell in the RowDataBound event and then set the
focus.

e.row.cell(0).focus()

Could you please send me the code snippet that you were using earlier to
focus on the cell in the grid, which does not seem to be working fine when
the Grid is in the UpdatePanel?

Regards,
Manish
www.ComponentOne.com

"fo*******@hotmail.com" wrote:
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
Jun 27 '08 #2
On Jun 11, 10:49 pm, foolme...@hotmail.com wrote:
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
Hi Bill,

Try this:
ScriptManager.GetCurrent(this.Page).SetFocus(cell) ;

Mykola
http://marss.co.ua - Casual ideas for web development
Jun 27 '08 #3
On Jun 12, 3:38*am, Manish <Man...@discussions.microsoft.comwrote:
Hello Bill,

I could not really understand, how you want to have focus in the cell of the
Grid. You can access the cell in the RowDataBound event and then set the
focus.

e.row.cell(0).focus()

Could you please send me the code snippet that you were using earlier to
focus on the cell in the grid, which does not seem to be working fine when
the Grid is in the UpdatePanel?

Regards,
Manishwww.ComponentOne.com

"foolme...@hotmail.com" wrote:
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- Hide quoted text -

- Show quoted text -
Thank you for the reply Manish. Focus() works on a control, but not a
cell in a gridview. We need to use javascript to focus a cell.
However once the gridview is in an UpdatePanel, then the javascript
stop working. It is too complicate to post the code here.

Bill
Jun 27 '08 #4
On Jun 12, 5:50*am, marss <marss...@gmail.comwrote:
On Jun 11, 10:49 pm, foolme...@hotmail.com wrote:
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

Hi Bill,

Try this:
ScriptManager.GetCurrent(this.Page).SetFocus(cell) ;

Mykolahttp://marss.co.ua- Casual ideas for web development
Thanks for the reply. I tried SetFocus() from ScriptManager. I works
with almost all the controls, but not the cell inside a gridview.

Bill
Jun 27 '08 #5

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

Similar topics

1
by: davidjgonzalez | last post by:
I have a GridView that has paging enabled. Each item (as defined in an ItemTemplate) includes several controls which have operations i would like to Atlas-enable. Everything is working well except...
1
by: jmdolinger | last post by:
Hi all, I'm a newbie to Atlas (and recently ASP.NET) after coming from a long Java background, also have done quite a bit with an Ajax.NET/ASP.NET 1.1 project, but it was basically all...
1
by: mark4asp | last post by:
I moved a page to another web-site and now it's broke! I had 5 pages in their own web-site. These pages have now been moved to another web-site. Everything is fine except that one of the pages,...
0
by: Reinhard | last post by:
Hi, Need some directions on Ajax, UpdatePanel and Gridview to achive the following: I like to show a Gridview with Data ONLY if the user is interested in Details, but without a full page...
0
by: jrnail23 | last post by:
I have a user control which contains an UpdatePanel, which contains a MultiView inside, with a GridView in one of the views. In my GridView, I have a ButtonField which is supposed to trigger a...
1
by: SachinSachin | last post by:
Hi All, I am implementing a custom gridview control, that emits some javascript to blink a row whenever a new row is added in gridview. The gridview is inside the <asp:updatepanel> for...
2
by: Raymond Du | last post by:
Hi, I am looking for a way to use Ajax inside gridview. I am not talking about putting a gridview inside an updatepanel and refresh the gridview, I want to use Ajax on per row basis, when user...
4
by: pablorp80 | last post by:
Hello, Here is what I need: I need the focus and the cursor set to a textbox named txtGT, every time no matter if it is the first page load or whether it is a postback. Here is the problem: I...
13
by: SAL | last post by:
Hello, I'm trying to include a popup in the ItemTemplate of a gridview row. The ItemTemplate for the field contains a textbox and when the user clicks in the textbox I want a popup panel to show...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.