Does anyone know if there is a Property for a Text Box that sets the focus to it? I am doing this in an event, I am not trying to set it in the Properties when setting up the Text Box.
I tried autofocus and autoFocus, but neither worked.
Does anyone know if there is a Property for a Text Box that sets the focus to it? I am doing this in an event, I am not trying to set it in the Properties when setting up the Text Box.
I tried autofocus and autoFocus, but neither worked.
per Kendo UI… there’s a method for “focus”
Not sure if that would work.
Not sure what you’re trying to do. Are you just trying to put that control in focus during an event? There is a control-focus-set tool available for such.
Thanks for finding that, but it did not work.
Yes, I have a ColumnChanged event that if a user selects a certain value in a combo, the combo is hidden and the text box appears. Wanted to default the cursor in there, no biggie if I can’t.
I think the control-focus-set works in that case.
It should shift focus to the control (textbox).
I’ve used it in MES events to send focus back to a particular control so the user can scan their next barcode. Seems to be pretty reliable.
Did not know about that, thanks for pointing it out. Did not work though, probably because my field is a TransView.
Mine is also a TransView…
Every branch of this “switch” event, ends in a control-focus-set… all pointed back to the same TransView textbox. So, the user scans a barcode, depending on its value, they go down one of the branches. At the end, the focus gets set back to the original textbox where it waits for the next barcode scan value which kicks off the event again.
Wonder if its a timing issue… can you put an on-create event on that textbox… so when it is created (painted onto the UI) the event fires to set focus?