3 decimal places with GridNumericColumn on sfDatagrid

I have a column bound to a decimal data type but its only showing 2 decimal places. How can I get it to show and accept 3 decimal places?

thx

5 Replies

VS Vijayarasan Sivanandham Syncfusion Team March 10, 2020 01:17 PM UTC

Hi Kim Dobranski,

Thank you for contacting Syncfusion support.

Your requirement can be achieved by setting value to NumberDecimalDigits property in SfDataGrid. For more information, please refer the below UG link,

UG link: https://help.syncfusion.com/windowsforms/datagrid/columntypes#data-formatting 
Regards,
Vijayarasan S 



KD Kim Dobranski March 11, 2020 03:43 AM UTC

Ok thanks but how do I set this with the designer? This is a code behind sample with the columns added dynamically. Is this the only way? There is no NumberDecimalDigits property in the designer when adding a numeric column. 


FP Farjana Parveen Ayubb Syncfusion Team March 11, 2020 08:41 AM UTC

Hi Kim, 
 
Thank you for your update. 
 
We didn’t provide the designer support for NumberFormatInfo, so you can set the NumberFormatInfo for GridNumericColumn in code behind.  
 
Regards, 
Farjana Parveen A 



KD Kim Dobranski March 12, 2020 06:50 PM UTC

Hi you can close this and disregard. I have decided to go with a different grid control.


FP Farjana Parveen Ayubb Syncfusion Team March 13, 2020 01:15 PM UTC

Hi Kim, 
  
Sorry for the inconvenience caused. 
 
We have already analyzed the feasibility of designer support for NumberFormatInfo. But unfortunately, NumberFormatInfo is a framework object that doesn't have default type converter to support designer options. Since the NumberFormatInfo doesn't have type converter, we could not provide support to add NumberFormatInfo in designer level for DataGrid. 
 
So you have to set the NumberFormatInfo in code behind, could you please share the difficulties when set the NumberFormatInfo in code behind, that will help us to provide the better solution. 
 
Could you please share the reason for choosing other grid control? We will make every effort to provide the solution for all your queries. 
  
Regards, 
Farjana Parveen A 


Loader.
Up arrow icon