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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Editing grid dropdown only works once - then "No Records Found"

Thread ID:

Created:

Updated:

Platform:

Replies:

144774 May 22,2019 02:16 AM UTC May 28,2019 01:07 PM UTC Angular - EJ 2 4
loading
Tags: Grid
Deanna Delapasse
Asked On May 22, 2019 02:16 AM UTC

I'm periodically refreshing a grid using an angular service's subscribe method.  I realize there are other ways but I need to be able to edit the grid so I'm trying to control the refresh by suspending the refresh timer during the edit activity (only 1 column is editable and it's a dropdown).  I struggled with showing the dropdown of options from a static list, but finally got it to work.  However, after the first edit my dropdown no longer works it says "No Records Found".  Any idea why?  Is there a better way to do this?

        <ejs-grid #grid id="queueGrid" [dataSource]='queueList' [editSettings]='editSettings' 
                                       [toolbar]='toolbar' height='515px'  (actionBegin)='actionBegin($event)' > 
...
                <e-column field='priority' headerText='Priority' editType= 'dropdownedit' 
                                            [edit]='priorityParam' width=150></e-column>

   public priorityChoices = [1,2,3,4,5];    

   ngOnInit(): void {
        this.toolbar = ['Edit', 'Delete', 'Update', 'Cancel'];
        this.editSettings = { allowEditing: true };
        this.priorityParam = {
            params: {
                allowFiltering: true,
                dataSource: new DataManager(this.priorityChoices),
                query: new Query(),
                actionComplete: () => false
            }
        };
        // Load the initial queue    
        this.loadQueueData();

        // Start the refreshing
        this.setReloadTimeout();
    }

Thavasianand Sankaranarayanan [Syncfusion]
Replied On May 22, 2019 12:38 PM UTC

Hi Deanna, 

Greetings from Syncfusion support. 

We have already discuss about your query in the following documentation. 


Please let us know if you need further assistance on this.  

Regards, 
Thavasianand S. 


Deanna Delapasse
Replied On May 22, 2019 12:46 PM UTC

I don't see documentation about why the dropdown only works 1 time (or maybe until the grid is refreshed).  Can you point out what is required to make it work > 1 time?

Thavasianand Sankaranarayanan [Syncfusion]
Replied On May 23, 2019 01:22 PM UTC

Hi Deanna,  

Sorry for the inconvenience caused.  

Query: “why the dropdown only works 1 time (or maybe until the grid is refreshed) 

We are able to reproduce the reported behavior at our end when column values does not exist in new dropdownlist data. In this scenario only we are able to reproduce the reported issue. Currently we are validating your query, we will update you the further details by 27th May 2019.  

Till then kindly bound the dataSource directly to dropdownlist instead of DataManager. Refer the below workaround 

this.priorityParam = { 
            params: { 
                allowFiltering: true, 
                dataSource:this.priorityChoices, 
               query: new Query(), 
                actionComplete: () => false 
            } 
        }; 



Regards, 
Thavasianand S. 
20

Thavasianand Sankaranarayanan [Syncfusion]
Replied On May 28, 2019 01:07 PM UTC

Hi Deanna,  

Thanks for the patience.  

To resolve the issue, we suggest you to modify the query property in the actionBegin event of dropdownlist. Refer the below modified code example   

ngOnInit(): void { 
    this.data = orderDatas; 
    this.editSettings = { allowEditing: true, allowAdding: true, allowDeleting: true }; 
    this.toolbar = ['Add', 'Edit', 'Delete', 'Update', 'Cancel']; 
    this.countryParams = { 
        params: { 
           allowFiltering: true, 
            dataSource: new DataManager(this.country), 
            fields: { text: 'countryName', value: 'countryName' }, 
            query: new Query(), 
            actionBegin: onbegin, 
            actionComplete: () => false  
            } 
    }; 
} 
 
} 
function onbegin(args){ 
args.query.queries = []; // modify the query 
} 


For your convenience we have prepared a sample using your code example.  


If above solution does not resolve your issue, please get back to us with more details about the issue.   

Regards, 
Thavasianand S. 


CONFIRMATION

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