KendoGrid drop down Editor issue with blank dataValueField

2 posts, 0 answers
  1. RK
    RK avatar
    5 posts
    Member since:
    May 2018

    Posted 31 May 2018 Link to this post

    Hi , I have attached the sample code snippet of the problem.

    The requirement is that grid will automatically select the drop down option based on server response as I already have a separate list of possible options at client side also ( drop down editor data source ) , this seems to work fine , but in certain scenario server will send blank/"" which means server doesn't have the data for this field and we need to correct at client side  by populating "please select an option" to and then user can select the other option. Now the problem is that when I change the selection of  last record ( the record which has blank/null) and then try to select drop down of some other row then its not allowing me to open the drop down of other row until and unless I fix the last column value .

    http://jsbin.com/hegajixuse/1/edit?html,js,output

    Below are the steps to reproduce - 

       * select last  record ( 4th record) dropdown 

        * 4th record - change selection to Apples

       *4th record change the selection back to "please select an option"

      * Now try to open any other drop down ( record 1/2/3 ) , screen wont allow me to open the dropdown of record1/2/3 until and unless I change the record 4 selection to something else from "please select and option"

     

     

     

     

  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 04 Jun 2018 Link to this post

    Hi,

    Since the value corresponding to the "please select an option" is empty string, you need to remove the "required" attribute from the input element in order to allow setting the empty value to the Grid. You could also set the "valuePrimitive" property to "true", so that the null could be handled correctly.

    Another thing that I could suggest is to use the latest versions and take advantage of the optionLabel:
    Hope this helps.


    Regards,
    Konstantin Dikov
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top