We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

numericedit right alligned?

Thread ID:

Created:

Updated:

Platform:

Replies:

147973 Sep 30,2019 12:13 PM UTC Oct 3,2019 10:59 AM UTC Vue 5
loading
Tags: Data Grid
Michael Kornatzki
Asked On September 30, 2019 12:13 PM UTC

Hi,
is it possible to make the value in a numericedit (NumericTextBox) of a dataGrid right aligned?

I want to configure for decimals a right aligned numeric edit field without spin buttons.

{
field: 'Freight',
headerText: 'Freight',
textAlign: 'Right',
format: 'C3',
width: 90,
editType: 'numericedit',
edit: { params: { decimals: 4, showSpinButton:false, validateDecimalOnType:true, textAlign: 'Right'} },
}

The value in the editor is still left aligned.

Kind regards,
michael




Pavithra Subramaniyam [Syncfusion]
Replied On October 1, 2019 05:09 AM UTC

Hi Michael, 
 
Thanks for contacting Syncfusion support. 
 
You can achieve your requirement by adding the “cssClass” property for the NumericTextBox component. Please refer to the below code example and documentation link for more information. 
 
 { 
    field: 'Freight', 
    headerText: 'Freight', 
    textAlign: 'Right', 
    format: 'C3', 
    width: 190, 
    editType: 'numericedit', 
    edit: { params: { decimals: 4, showSpinButton:false, validateDecimalOnType:truecssClass: 'numericalign'} }, 
}, 
 
 
[Style] 
 .numericalign .e-numerictextbox{ 
        text-align:right; 
  } 
 
 
 
Regards, 
Pavithra S. 


Michael Kornatzki
Replied On October 1, 2019 05:26 AM UTC

Thank you, this works.

Pavithra Subramaniyam [Syncfusion]
Replied On October 1, 2019 07:36 AM UTC

Hi Michael, 
 
Thanks for your update. 
 
We are glad to know that the provided solution helped you. 
 
Please get back to us if you need any assistance on this. 
 
Regards, 
Pavithra S. 


pradeep
Replied On October 3, 2019 10:40 AM UTC

Hi Michael, 
 
Thanks for contacting Syncfusion support. 
 
You can achieve your requirement by adding the “cssClass” property for the NumericTextBox component. Please refer to the below code example and documentation link for more information. 
 
 { 
    field: 'Freight', 
    headerText: 'Freight', 
    textAlign: 'Right', 
    format: 'C3', 
    width: 190, 
    editType: 'numericedit', 
    edit: { params: { decimals: 4, showSpinButton:false, validateDecimalOnType:truecssClass: 'numericalign'} }, 
}, 
 
 
[Style] 
 .numericalign .e-numerictextbox{ 
        text-align:right; 
  } 
 
 
 
Regards, 
Pavithra S. 


not work

Pavithra Subramaniyam [Syncfusion]
Replied On October 3, 2019 10:59 AM UTC

Hi pradeep, 
 
For validating your query we need some more details from your end. Could you please provide the below details that will be helpful for better understanding and provide solution as early as possible. 
 
  1. Share your code example.
  2. Share the customized style for numeric text box
  3. Share the Syncfusion Package version you are using.
 
Regards, 
Pavithra S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon