Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Problems using Focus() method on a webcontrol

Reply
Thread Tools

Problems using Focus() method on a webcontrol

 
 
RBM007
Guest
Posts: n/a
 
      11-02-2006
Hello,

I have created webpages in the atlas standard. To help my users, I
automaticaly focus to the first editable control which is in a GridView
kind control.
Every gridview is placed in a UpdatePanel which is recently translated
from Atlas to AJAX. Before the translation everything works perfectly,
but after the translation I got problems with calling focus.

Here some code:
DropDownList first = null;
if (myGridView.EditIndex == -1)
{
first =
((DropDownList)myGridView.FooterRow.FindControl("C ontrolNameEditTemplate"));
}
else
{
first =
((DropDownList)myGridView.Rows[ExGrid1.EditIndex].FindControl("ControlNameFooter"));
}
first.Focus();

This code is placed (and called) upon databinding of the grid, but it
only works when the page is first loaded. Does anyone know how I can
fix this error? Thanks in advantage.

Greetings,

René Beltman

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems using Focus() method on a webcontrol RBM007 ASP .Net 0 11-02-2006 10:07 AM
Custom webcontrol that references another webcontrol Fabricio ASP .Net Building Controls 0 09-21-2005 02:55 AM
Trapping an Exception ocurring in a Webcontrol at the Page or parent WebControl level. ASP .Net 2 01-31-2005 06:34 PM
WebControl inside of WebControl and attaching events Kasabaarde Sumta ASP .Net Building Controls 0 12-13-2004 09:51 PM
Can a webcontrol (webcontrol.dll) have a configuration file? Luis Ramírez. ASP .Net Building Controls 2 07-06-2004 04:35 PM



Advertisments