Auto-focusing a control on selection

I have a table with rows of Syncfusion controls for taking customer order.  One of the controls is MultiColumnComboBox for selecting products 

 My requirement is to run some logic and then move focus to a numerictextbox on the same row once selection is made. I developed JavaScript helper for moving focus and I invoke this method in OnValueSelect  event handler,

Everything works fine except the focus. The problem is that once selection made the numerictextbox receives focus and immediately loses it. I have also tried invoking the focus setting logic in PopupClosed event handler but no success.


Thanks for usual assistance


Regards.

Paul Aziz


4 Replies 1 reply marked as answer

YA YuvanShankar Arunagiri Syncfusion Team September 19, 2025 10:08 AM UTC

Hi Paul,


We have validated your requirement to set focus on the NumericTextBox when an event is triggered from the MultiColumnComboBox.

This can be achieved by using either the PopupClosed or ValueChange event of the MultiColumnComboBox component. Within the event handler, you can use a Task.Delay to ensure the focus is set after the popup closes or the value changes. Then, call the FocusAsync method to programmatically set focus to the NumericTextBox.

Please refer to the code snippet and the attached sample file for implementation details.


<table>

    <tr>

        <td>

            <SfMultiColumnComboBox TItem="Games" @ref="@multicolumnObj" TValue="string" DataSource="LocalData" ValueField="Game" Placeholder="Select a game" TextField="Game" PopupClosed="OnChange">

            </SfMultiColumnComboBox>

        </td>

        <td>

            <SfNumericTextBox @ref="@NumericTextBoxObj" TValue="int?" Value="100"></SfNumericTextBox>

        </td>

    </tr>

</table>

….

public async void OnChange()

{

    await Task.Delay(100);

    await NumericTextBoxObj.FocusAsync();

}


Output screenshot:


Please let us know if you need any further assistance or clarification.


Regards,

YuvanShankar A


Attachment: Home_f5db0b99.zip

Marked as answer

PA Paul September 27, 2025 06:28 PM UTC

Hello  YuvanShankar A,


Thanks so much for your assistance.



Best reagrds,

Paul Aiziz



SS Shereen Shajahan Syncfusion Team September 30, 2025 07:34 AM UTC

Hi Paul,

Glad to know that the provided solution helped, please get back to us for assistance in the future.

Regards,

Shereen



EA emma avia April 6, 2026 06:53 AM UTC

Auto-focusing a control on selection is a smart usability improvement that enhances user experience by reducing extra clicks and guiding attention exactly where it’s needed. It makes interfaces feel more responsive and intuitive, especially in forms or dynamic UI elements. Just like in Game, where smooth interaction and quick responses keep players engaged, this kind of feature ensures users stay focused and efficient while navigating a system.

Loader.
Up arrow icon