Without having tested this code, I suspect that you're seeing a race condition.Many NetAdvantage for ASP.NET controls use RegisterStartupScript() to initialize their client-side objects. The trouble with this is that a programmer can't control the order in which multiple scripts logged with RegisterStartupScript() are run. In this case, it's likely that the scripts for the NetAdvantage for ASP.NET controls are happening after your window opens, and thus steals focus back to the parent window.I can think of a couple options to get around this, and there are likely others:
Please remember that these forums area a peer-to-peer resource to share issues and ideas with other Infragistics users. If you require official support from Infragistics for further assistance, please submit a support incident to Infragistics Developer Support from this page of our website.
Could you explain what you mean in step 1 by "Initialize" client-side event on a NetAdvantage for ASP.NET control, such as the InitializeLayout event of WebGrid.
I have initialized the webgrid for my page but no matter what i do, setTimeout or anything. the web grid always steals focus from the page.
Hello,
You can try the body onload option. Example - say, you have a grid and a form with various input controls, including TextBox
<body onload="moveFocusToTextBox()">
<asp:TextBox runat="server" ID="TextBox1" ... />
<script type="text/javascript">
function moveFocusToTextBox()
{
var textBox = document.getElementById("<%= TextBox1.ClientID %>");
textBox.focus();
}
If this does not work, you can try some setTimeout trickery:
window.setTimeout( function() {
}, 20);