Hi , Syncfusion Team
Help me to solve this,
How to use two edit option for same cell in inline data grid , Because decimal format (format="N3") is not applying to the (Gross Weight) Cell while using this event [edit="@((new {create = "create", read = "read", destroy = "destroy",write = "write"}))"]
Example:
Thanks,
Hi Kalpatharu,
Thanks for contacting Syncfusion support.
In EJ2 Grid column, we are not supposed to use both editParams and cellEditTemplate in the same column. We have to use any of these in a column.
If you want to apply format on cellEditTemplate feature, you can achieve this by following the below way.
|
<e-grid-column field="Weight" headerText="Weight" format="N3" editType="numericedit" edit="@(new {create = "create", read = "read", destroy = "destroy", write = "write"})" width="120"></e-grid-column>
<script> var NTObj;
function create(args) { elem = document.createElement('input'); return elem; }
function
write(args) { NTObj = new ej.inputs.NumericTextBox({ // sets value to the NumericTextBox value: args.rowData[args.column.field], format: "N3", showSpinButton: false, decimals: 3, }); NTObj.appendTo(args.element); }
function destroy() { NTObj.destroy(); }
function read(args) { return NTObj.value; } </script>
|
If you want to apply format through editParams, you can achieve it by using the following code,
|
|
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/core_grid_numericedit7710349.zip
If this does not meet your requirement, kindly explain more details to proceed further.
Regards,
Rajapandiyan S
Hi MR. Rajapandiyan
Thanks for your Support, is working fine now.
Regards,
Kalpatharu
Hi Kalpatharu,
We are glad to hear that you have achieved your requirement with the solution provided.
Please get back to us if you need further assistance.
Regards,
Rajapandiyan S