locked
Showing empty space after binding the values to Optionset in MS CRM2013 and CRM2015 RRS feed

  • Question

  • Using the below code am able to add the Values to Optionset using java script dynamically in ms crm2013. Values are added successfully but Empty space also adding end of the Optionset values. Please let me know why space adding along with Values.

    Thanks in advance.


    function Onload_BindOptionsetValues()
    {    
        var optionset = Xrm.Page.getControl("wi_testoptionset").clearOptions();         
        var wrap_Control = Xrm.Page.getControl("wi_testoptionset");
        var option0 = { value: 100000000, text: "Item1" };
        var option1 = { value: 100000001, text: "Item2" };
        var option2 = { value: 100000002, text: "Item3" };
        var option3 = { value: 100000003, text: "Item4" };
        wrap_Control.addOption(option0);
        wrap_Control.addOption(option1);
        wrap_Control.addOption(option2);
        wrap_Control.addOption(option3);          
    }

    Wednesday, August 26, 2015 1:42 PM