numericedit right alligned?
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
SIGN IN To post a reply.
5 Replies
PS
Pavithra Subramaniyam
Syncfusion Team
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:true, cssClass: 'numericalign'} },
},
[Style]
.numericalign .e-numerictextbox{
text-align:right;
}
|
Regards,
Pavithra S.
MK
Michael Kornatzki
October 1, 2019 05:26 AM UTC
Thank you, this works.
PS
Pavithra Subramaniyam
Syncfusion Team
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.
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:true, cssClass: 'numericalign'} },},[Style].numericalign .e-numerictextbox{text-align:right;}Regards,Pavithra S.
not work
PS
Pavithra Subramaniyam
Syncfusion Team
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.
- Share your code example.
- Share the customized style for numeric text box
- Share the Syncfusion Package version you are using.
Regards,
Pavithra S.
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
-
MK Michael Kornatzki
- Sep 30, 2019 12:13 PM UTC
- Oct 3, 2019 10:59 AM UTC