Problems using Focus() method on a webcontrol

R

RBM007

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("ControlNameEditTemplate"));
}
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top