e-data-manager retrieves duplicate records

Hello,
I'm struggling with a few problems using the Grid.

1.) When I use Grid as a data source <e-data-manager url="" adapter=""></e-data-manager>, three times the same data is loaded into the Grid. I do not know what this problem could do.

2.) I have been pasted and edited with "dialogTemplate", and when I try to save the new entry, the entry to the Action Insert is empty. Editing an existing record is working properly.

Thank you for your help and I greet you with regards.



Attachment: FinecarRentCar_7ed22fb7.zip

1 Reply

MF Mohammed Farook J Syncfusion Team October 8, 2018 11:36 AM UTC

Hi Patrik, 
 
Thanks for contacting Syncfusion support. 
 
Query: I have been pasted and edited with "dialogTemplate", and when I try to save the new entry, the entry to the Action Insert is empty. Editing an existing record is working properly. 
 
We have validated your query and prepared a sample “Grid with Dialog template” based on your requirement.  Please find the below code example and sample for your reference. 
 
[code example] 
<ejs-grid id="Grid" toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" })" actionBegin="actionBegin" actionComplete="actionComplete" allowPaging="true"> 
    <e-data-manager url="/Home/GridDatasource" insertUrl="/Home/Insert" updateUrl="/Home/Update" removeUrl="/Home/Delete" adaptor="UrlAdaptor"></e-data-manager> 
    <e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true" mode="Dialog" template='#dialogtemplate'></e-grid-editSettings> 
    ... 
</ejs-grid> 
... 
 
<script id='dialogtemplate' type="text/x-template"> 
    <div> 
        <div class="form-row"> 
            <div class="form-group col-md-6"> 
                <div class="e-float-input e-control-wrapper"> 
                    <input id="OrderID" name="OrderID" type="text" value=${if(isAdd)} '' ${else} ${OrderID} ${/if}  ${if(isAdd)}'' ${else} disabled ${/if} /> 
                    <span class="e-float-line"></span> 
                    <label class="e-float-text e-label-top" for="OrderID">Order ID123</label> 
                </div> 
            </div> 
            <div class="form-group col-md-6"> 
                <div class="e-float-input e-control-wrapper"> 
                    <input id="CustomerID" name="CustomerID" type="text" value=${if(isAdd)} '' ${else} ${CustomerID} ${/if} /> 
                    <span class="e-float-line"></span> 
                    <label class="e-float-text e-label-top" for="CustomerID">Customer ID</label> 
                </div> 
                 
            </div> 
        </div> 
        <div class="form-row"> 
            <div class="form-group col-md-6"> 
                <div class="e-float-input e-control-wrapper"> 
                    <input id="ShipCountry" name="ShipCountry" type="text" value=${if(isAdd)} '' ${else} ${ShipCountry} ${/if} /> 
                    <span class="e-float-line"></span> 
                    <label class="e-float-text e-label-top" for="ShipCountry">Ship Country</label> 
                </div> 
            </div> 
        </div> 
    </div> 
</script> 
 
Please  find the sample in below link. 
 
 
 
Please get back to us if you need further assistance. 
 
Regards, 
J Mohammed Farook. 
 


Loader.
Up arrow icon