Hi,
I have a very simple page that contains only the ASPxSpreadsheet control and
what i want to do is set the control focus just after the page load is complete.
So i can input something else by the keyboard directly instead of first select
the cell by mouse click and then input.
I tried using the OnLoad event of ASPxSpreadsheet with ASPxSpreadsheet1.Focust();
and also javascript: ASPxSpreadsheet .Focus(), but none of those worked.
Please help, thanks!
Hello,
This behavior is incorrect and I forwarded this scenario to our R&D team for further research. Please bear with us.
In the meantime, it's possible to focus the control using the client-side Init event handler:
<dx:ASPxSpreadsheet ID="ASPxSpreadsheet1" runat="server" WorkDirectory="~/App_Data/WorkDirectory"> <ClientSideEvents Init="function(s, e) { aspxFocusSpreadsheet(s); }" /> </dx:ASPxSpreadsheet>
function aspxFocusSpreadsheet(spreadsheet) { var inputController = spreadsheet.getInputController(); if (inputController) inputController.captureFocus(); }
I've attached a simple sample.
Thanks, it works!