I can't enter a new value in a dropdownedit field

Hi,

I have a column in my grid defined like this :

        <e-column field="Site" allow-editing="true" edit-type="DropdownEdit" validation-rules='new Dictionary<string, object>() { { "required",true} }'></e-column>

In my grid, i can choose one of dropdown value, it's ok. 

But how can i enter a new value please ?

3 Replies

VN Vignesh Natarajan Syncfusion Team March 23, 2018 01:02 PM UTC

Hi Frédéric, 

Thanks for contacting Syncfusion support  

Query: “But how can i enter a new value please” 

We have analyzed your query and dropdownlist control will enables you to select single or multiple items from the list. We are not able to type new value while using dropdownlist as editType.  
 
If you want to add new item by typing the value in it, then we suggest you to render the ejComboBox control in the Grid column using EditTemplate feature. 
 
Refer the help documentation for your reference 
 
  
Regards, 
Vignesh Natarajan 



FP Frédéric Peyronnin March 27, 2018 01:07 PM UTC

Hi, Thank you for your answer.
But it's quite complicated for me because first, i can't find any sample in the forum with an ejcombobox Inside a grid cell, and second, i'll have to populate myself the comboboxes with the result of an SQL request (i need 5 combobox in my grid), and it's a pitty because it will take time while the edit-type="DropdownEdit" of the grid does it very well and in a very simple way.
There's just missing the edit feature.
Don't you plan to add this edit feature in a next version please ?


VN Vignesh Natarajan Syncfusion Team March 28, 2018 04:50 PM UTC

Hi Frédéric, 
 
Sorry for the inconvenience caused.  
 
We have analyzed your query and request but many different editor controls can be rendered inside the form element (edit form). But Default EditType cannot be provided for all the edit controls. 
 
To render the different editors in Grid we have Edit template feature. So kindly achieved your request using Edit template feature of the grid.  
 
Kindly refer the below code snippet to render the comboBox control using Edittemplate. 
 
<e-column field="ShipPostalCode" header-text="Ship Postal Code"> 
 <e-edit-template create="create" read="read" write="write"> </e-edit-template> 
 </e-column 
.          .         .  
<script> 
    function create() 
        { 
          return $("<input>"); 
        } 
    function write(args) 
       { 
        args.element.ejComboBox({ 
        dataSource: sportsData, 
        value : args.rowdata["ShipPostalCode"] 
         });             
       } 
    function read(args) 
       { 
        return args.ejComboBox("getItems"); 
      } 
 
</script> 
  
 
Regards, 
Vignesh Natarajan 
 
  


Loader.
Up arrow icon