Focus on a control

R

Roberto\(DOTNET\)

Hi at all,
i have a little problem.
In a simple web page aspx i have a DataGrid (..WebControls.DataGrid) and
some others web controls (edits and buttons). The datagrid control is usad
to display some rows.
How i can put focus on the first row of datagrid? all of this in vbnet
obviously.

thanks in advance
roberto
 
C

Cor Ligthert

Roberto,

I never saw a method for this. The only thing I could do was add a little
piece of javascript at the end of the aspx page (problem is that it cannot
in the load event otherwise you could do it using VBNet)

<INPUT tabindex="1" id="fieldid" type="text" size="27">

//This should be the last rows in your html aspx file

<script language="JavaScript">
document.all("fieldid").focus();
</script>
</HTML>

However maybe somebody has a better idea.

When not than I hope this helps a little bit?

Cor
 

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

Top