CellSave. Incorrect decimal places

Hello,

there are a problem with CellSave event in grid with decimal places. If I am editing cell in grid and adding number with 3 numbers after comma (for example 12.123) and then clicking keyboard button 'enter' - CellSave method gets full number with 3 decimal places but if after editing I am just going with mouse somewhere else - CellSave method gets only two numbers after comma. How can I change that every time get full entered number?

1 Reply 1 reply marked as answer

BS Balaji Sekar Syncfusion Team June 9, 2020 05:05 AM UTC

Hi AC, 
 
Greetings from the Syncfusion support. 
 
We have validated your query with provided information and we suggest you to use format option in Grid column it will bind value with defined format basis. In below code example, we have defined the format is C3 in Freight column it will bind after comma with 3 digit values. Please refer the below code example and sample for more information. 
[app.component.html] 
      <ejs-grid #batchgrid id='Batchgrid' [dataSource]='data' allowPaging='true' [pageSettings]='pageSettings' [editSettings]='editSettings' [toolbar]='toolbar'> 
            <e-columns> 
                <e-column field='OrderID' headerText='Order ID' width='120' textAlign='Right' isPrimaryKey='true' [validationRules]='orderidrules'></e-column> 
                <e-column field='CustomerID' headerText='Customer ID' width='120' [validationRules]='customeridrules'></e-column> 
                <e-column field='Freight' headerText='Freight' width='120' format='C3' textAlign='Right' editType='numericedit' ></e-column> 
                <e-column field='OrderDate' headerText='Order Date' width='130' format='yMd' editType='datepickeredit' textAlign='Right'></e-column> 
                <e-column field='ShipCountry' headerText='Ship Country' width='150' editType='dropdownedit' [edit]='editparams'></e-column> 
            </e-columns> 
        </ejs-grid> 
 
 

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

Regards, 
Balaji Sekar 


Marked as answer
Loader.
Up arrow icon