We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Child grid DropDownEditCell datasource not working

Thread ID:





149099 Nov 14,2019 11:12 AM UTC Nov 15,2019 07:14 AM UTC Angular - EJ 2 1
Tags: Grid
Arjuna Dratharashtra
Asked On November 14, 2019 11:12 AM UTC

I am trying to bind a datasource to DropDownEditCell but it does not working. Please help. I am setting edit.params with the dataSource though its working for placeholder but not for the dataSource. All the other cell types are working (NumericEditCell, DataPickerEditCell etc).

public errorGridActionBegin(argsanycontextany) {

    if (args.requestType == 'beginEdit') {
      let editCellTypeObject = {
        'dropdownedit': DropDownEditCell'numericedit': NumericEditCell,
        'datepickeredit': DatePickerEditCell'defaultedit': DefaultEditCell,
        'comboboxedit': ComboboxEditCell
      let colColumn = context.getColumnByField('correctedData');
      let validation = context.context.dataFileFields.find(_ => _.propertyName == args.rowData.field);
      if (validation != undefined) {

        col.validationRules = {
          range: [validation.rangeMinvalidation.rangeMax]
      if (args.rowData.field == 'PointId') {
        col.editType = 'dropdownedit';
        //col.dataSource = context.context.points;
        col.edit.params = {
          dataSource: context.context.points,
          fields: { value: 'type', text: 'type' }
       /* col.edit.params = {
          dataSource: ['test 1', 'test 2'],
          placeholder: 'arjuna',
          value: args.rowData.correctedData

      } else {
        col.editType = 'numericedit';

      col.edit.params = {
        dataSource: ['test 1''test 2'],
        placeholder: 'arjuna'
      col.edit = extend(
        new editCellType[col.editType && editCellType[col.editType] ?
          col.editType : 'defaultedit'](contextcontext.serviceLocator),
        col.edit || {});
      /*col.edit.params = {
        min: 0,
        max: 10

      /*col.validationRules = {
        range: [0,10]

Attachment: editdropdown_a4f8380b.zip

Pavithra Subramaniyam [Syncfusion]
Replied On November 15, 2019 07:14 AM UTC

Hi Arjuna , 
Thanks for contacting Syncfusion support. 
Query :  I am trying to bind a datasource to DropDownEditCell but it does not working.  
We have validated the provided details. To use custom datasource in the DropDownList we must include Query property in the edit params. Please refer the below code example documentation for information. 
    selector: 'app-root', 
    template: `<ejs-grid [dataSource]='data' [editSettings]='editSettings'  [toolbar]='toolbar' height='273px'> 
                 <e-column field='ShipCountry' headerText='Ship Country' editType='dropdownedit' [edit]='ddParams'  width=150></e-column> 
export class AppComponent implements OnInit { 
    public data: Object[]; 
    public editSettings: EditSettingsModel; 
    public toolbar: ToolbarItems[]; 
    public ddParams: IEditCell; 
    ngOnInit(): void { 
        this.data = data; 
        this.editSettings = { allowEditing: true, allowAdding: true, allowDeleting: true }; 
        this.toolbar = ['Add', 'Edit', 'Delete', 'Update', 'Cancel']; 
        this.ddParams = { params: {dataSource: ['test 1', 'test 2'],query: new Query(),placeholder: 'arjuna' } }; 
Please get back to us, if you need further assistance. 
Pavithra S. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon