How do I set the tabindex on dropdownlist?

I want to set tabindex on this:

                        @Html.EJ().DropDownList("FunctionCodes").Datasource(Model.Functions).DropDownListFields(Function(F)
                                                                                                                    Return F.Value("Code").Text("Description")
                                                                                                                End Function).Value(Model.EmployeeDefaultFunctionCode).EnableFilterSearch(True).FilterType(SearchFilterType.Contains).Width("100%")


Thank you!

1 Reply

PO Prince Oliver Syncfusion Team February 5, 2018 09:17 AM UTC

Hi Sam, 

Thank you for contacting Syncfusion forums. 

To set “tabindex” for the DropDownList control, we need to use the control’s create event to access the wrapper and set the “tabindex” attribute to the wrapper element. 

@Html.EJ().DropDownList("groupsList").Datasource(DirectCast(ViewBag.datasource, IEnumerable(Of groups))).DropDownListFields(Function(F) F.Value("parentId").Text("text")).EnableFilterSearch(True).FilterType(SearchFilterType.Contains).Width("100%").ClientSideEvents(Function(F) F.Create("oncreate")) 
 
<script> 
    function oncreate() { 
        //this.wrapper is a widget wrapper to assign the tabindex value based on our requirement  
        this.wrapper.attr("tabindex", "1"); 
    }  
</script> 

We have prepared a sample for your reference, please find the sample from the following location: http://www.syncfusion.com/downloads/support/forum/135755/ze/DDLtabindexVB-588683410 

Regards, 
Prince 


Loader.
Up arrow icon