Custom options not showing when using a ColumnDirective of editType='dropdownedit'

Hello and good afternoon.

I'm trying to pass custom data to a cell of type "dropdownedit" using the ColumnDirective, but when I follow the documentation (here) the system behaves erratically.

First I followed the example like this:

const editParams = {params: { value: 'Germany' }};

/**/

<ColumnDirective
/**/
editType='dropdownedit'
edit={editParams}
/>


But the grid got rendered like this:

2021-09-22_18-15_1.png

It only showed the values that already exist on the same column and a blank space selected. When I press enter on the blank space, suddenly the custom value gets added.

2021-09-22_18-14.png

On top of that, if I keep doing it, the rest of the options disappear from the board and they get replaced with the custom option:

2021-09-22_18-15.png 

Is there any way to render only the custom options without showing a blank option at the start?


Another question: is there a way of adding an array of options? If so, what Is the correct syntax? For example:

const editParams = {params: { value: 'Germany', value: 'Austria', value: 'Denmark' }}; // <-- this throws an error
const editParams = {params: { value: ['Germany', 'Austria', 'Denmark' ]}}; // <-- this prints all options combined


Thank you very much for your support.


1 Reply

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team September 23, 2021 04:26 PM UTC

Hi Lucas, 

Thanks for your interest in Syncfusion Components. 

Query#:- Custom options not showing when using a ColumnDirective of editType='dropdownedit' 
 
We have checked your query and we have already discussed about “How to provide custom dataSource to dropdownlist” in our UG documentation. 

Refer to the documentation Link:- 
 
From your provided details, we would let you know that values provided in Custom dataSource should be present in TreeGrid’s  dataSource. Based on that it will map the value with TreeGrid datasource and bind value to dropdownlist. 

Please get back us if you are facing any difficulties on this. 

Regards,
Farveen sulthana T 


Loader.
Up arrow icon