Dear Support,
I'm in the process of creating dropdownlist as custom toolbar template. I'm following this link tutorial: https://ej2.syncfusion.com/documentation/grid/how-to/create-custom-tool-bar-with-drop-down-list/ but resulting in error:
below the template code:
<div id='toolbar-template'> |
and below the dropdownlist initialization at grid dataBound:
//custom dropdown toolbar |
Calling the template at grid toolbarTemplate:
toolbarTemplate: '#toolbar-template' |
Could you please help me provide working example of custom toolbar using dropdownlist?
Thank you in advance
Ismail
Hi Rajapandiyan,
Thank you for the update. After change the Syncfusion version from v19.2 into v19.3, now the custom dropdownlist toolbar is showing.
But come new problem, if we playing with the grid sorting, the dropdown toolbar become duplicate each time we play around with the sorting.
Below image from your stackblitz demo:
and below capture from my application that behave the same:
Best regards,
Ismail
|
var isInitial = true;
function dataBound(args) {
// dataBound event will be triggered for every data action like sorting, filtering, etc.
if (isInitial) {
dropDownListObject.appendTo('#ddlelement');
isInitial = false;
}
}
|
Hi Pavithra,
Thank you for your update info. Adding the flag solve the problem.
Thank you for your kind support.
Best regards,
Ismail