This is a migrated thread and some comments may be shown as answers.

KendoGrid drop down Editor issue with blank dataValueField

1 Answer 1112 Views
Grid
This is a migrated thread and some comments may be shown as answers.
RK
Top achievements
Rank 1
RK asked on 31 May 2018, 09:45 PM

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"

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 04 Jun 2018, 12:29 PM
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.
Tags
Grid
Asked by
RK
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or