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.
Unfortunately, activation email could not send to your email. Please try again.

Grid refresh after changing default value

Thread ID:

Created:

Updated:

Platform:

Replies:

132716 Sep 17,2017 07:51 PM Sep 20,2017 12:27 PM Angular 3
loading
Tags: ejGrid
Marko
Asked On September 17, 2017 07:51 PM

Hi,

I have the following select:

<select class="form-control" [(ngModel)]="defaultId">
<option *ngFor="let i of employeList" [ngValue]="i.id">{{ i.firstName }} {{ i.lastName }}</option>
</select>
And the following Grid:
<ej-grid
id="Grid"
[allowRowDragAndDrop]="true"
selectionType="multiple"
[dataSource]="gridData"
[editSettings]="editSettings"
(actionComplete)="actionComplete($event)"
...

>
<e-columns>
...
<e-column field="ownerId" headerText="Owner" width="50" [editType]="editTypeDropdown" [dataSource]="employeList" foreignKeyField="id" foreignKeyValue="text" [defaultValue]="defaultId"></e-column>
</e-columns>
</ej-grid>
And in editSettings I have selected batch editMode.
And always when I change defaultId with select, that cause grid refresh, which trash all unsaved changes. So is there any solution which dosen't cause grid refresh when changing defaultValue for e-column?

Regards,
Marko



Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On September 18, 2017 08:55 AM

Hi Marko, 

Thanks for contacting Syncfusion Support. 

We have checked your query and we are unable to reproduce your reported problem at our end. We suspected that without saving the entire batch Editing changes (i.e. without click on update icon on the Grid) after finished the individual cell changes on Grid, you are changing the value on the dropdownlist that causes the Grid to remove saved data. To resolve this error, You need to save the entire batch edit changes by clicking OK button on pop up shown while click on update icon. When we doesn’t save the entire batch changes it will not get update on the Grid which is the behavior for Batch editing . After that you can select the default value change on the dropdownlist. 

Please refer to the documentation link:- 


Please refer to the Video demo:- 


If we misunderstood your query, please get back to us with further details. 

Regards, 

Farveen sulthana T 


Marko
Replied On September 19, 2017 05:08 PM

Hi,

yes there has come to missunderstanding, but this is probably my fault. In your video you have changing other select than I was talking about. To my problem comes when you change select with binding defaultId ([(ngModel)]="defaultId").

I have prepared an example and attached it with my code and video in it.

In video I change owner select, but my desktop recorder didn't capture that very nice, so:


https://puu.sh/xDPO6/4d37121a3b.png

and I don't wantt to lose those unsaved changes if I only changing default value for one column.

Regards,

Marko


Attachment: angular2seeds_8ff5d5b3.rar

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On September 20, 2017 12:27 PM

Hi Marko, 

We have checked your code example and screenshot and we can reproduce your reported problem only when we change the dropdownList value without saving the entire batch changes in the Grid. In Batch editing, we have to update the entire Batch editing changes when we change the individual batch cell or else insert any record. The updated changes will get lost if you doesn’t the click the update icon which was the default behavior of the Grid. So we suggested you to update the batch changes before changing the value on the dropdownList. 

Please refer to the documentation link and Demo link for batch editing:- 



Please get back to us if you need any further assistance. 

Regards, 

Farveen sulthana T 


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.

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.

;