Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
webdropdown client databind can not get select_value
posted

hi,when i set datasource to webdropdown,the dropdownitem's text display looks good ,but when i  raise client SelectionChanged events,the sender.get_selectedItem().get_value() always return empty, how can i get the selecteditem's value.

//json  

var faulData = [{ "SMSFaultCodeID": "1", "FaultCodeName": "error_A"}];


        function onDataBind(sender, evntArgs) {
            evntArgs.set_cancel(true);
            sender._pi.show(sender);
            $.ajax({
                url: "products",
                contentType: "text/json; charset=utf-8",
                dataType: "json",
                success: function (datatsource, st) {
                    //dataSource = datatsource.data.results;
                     dataSource=faulData ;

                    sender.set_dataSource(dataSource);
                    sender.dataBind();
                    sender._pi.hide(sender);
                },
                error: function () {
                    alert("Error with AJAX callback");
                }
            });
        }

        function onSelectionChanged(sender, evntArgs) {
            var selectvalue= sender.get_selectedItem().get_value().toString();
        }

 

 <ig:WebDropDown ID="myDropDown" runat="server" ClientIDMode="Static" Width="200px"
        EnableClientRendering="true" DropDownContainerMaxHeight="200" EnableDropDownAsChild="false"
        AutoPostBackFlags-SelectionChanged="Off" TextField="FaultCodeName" ValueField="SMSFaultCodeID"
        AutoPostBack="false" ClientEvents-DataBinding="onDataBind" DisplayMode="DropDown">
        <ClientEvents SelectionChanged="onSelectionChanged" />
    </ig:WebDropDown>

Parents
  • 37874
    posted

    Hi lovedogdog,

    Thank you for posting in the community.

    I have investigated your issue and, I have asked our engineering staff to examine this further.  To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 115612.  The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution. 

     

    I will leave this case open and update you with any new information after the review.  You can also continue to send updates to this case at any time.

     

    You can view the status of the development issue connected to this case by going to the “Account” tab on our website, hovering to the "My Support Activity" dropdown and selecting the "Development Issues" tab. 

     

    Please let me know if you need more information.

     

Reply Children
No Data