Grid refresh after changing default value
Hi,
I have the following select:
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
I have the following select:
And the following Grid:
<select class="form-control" [(ngModel)]="defaultId">
<option *ngFor="let i of employeList" [ngValue]="i.id">{{ i.firstName }} {{ i.lastName }}</option>
</select>
<ej-gridAnd in editSettings I have selected batch editMode.
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 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
SIGN IN To post a reply.
3 Replies
FS
Farveen Sulthana Thameeztheen Basha
Syncfusion Team
September 18, 2017 12:55 PM UTC
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
MA
Marko
September 19, 2017 09:08 PM UTC
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:

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
FS
Farveen Sulthana Thameeztheen Basha
Syncfusion Team
September 20, 2017 04:27 PM UTC
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
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
MA Marko
- Sep 17, 2017 11:51 PM UTC
- Sep 20, 2017 04:27 PM UTC