NumericTextBox text align

Hi,

I have a question about NumericTextBox control. I want to align the text from that control to left. It is possible? How?

In a form, it looks wired with all other controls with the text aligned to the left and NumericTextBox align to the right.

Thanks.

4 Replies

AD Administrator Syncfusion Team September 22, 2006 03:43 PM UTC



>Hi,

I have a question about NumericTextBox control. I want to align the text from that control to left. It is possible? How?

In a form, it looks wired with all other controls with the text aligned to the left and NumericTextBox align to the right.

Thanks.


AD Administrator Syncfusion Team September 22, 2006 03:48 PM UTC

Hi Irina,

Under the OnLoad Event of the Body Tag or under the Form Tag call appropriate JS function like, .

Under this function you can add a line like below,
_sfNumericTextBoxControlName.GetTextBox().style.textAlign= "left";

It will leftalign the Text when it is loaded.

Thanks,
G.Pradeep.



IR Irina September 27, 2006 11:51 AM UTC


Hi,

My numeric textbox is inside a grid, so his id is generated. I can''t know it from client side, so the cahnges of the style must be done from the server.
Any idea?

Thanks.


>Hi Irina,

Under the OnLoad Event of the Body Tag or under the Form Tag call appropriate JS function like, .

Under this function you can add a line like below,
_sfNumericTextBoxControlName.GetTextBox().style.textAlign= "left";

It will leftalign the Text when it is loaded.

Thanks,
G.Pradeep.



BH Bhuvana Syncfusion Team September 27, 2006 01:57 PM UTC

Hi Irina,

If you are using 4.3 version, you could use ClientObjectID property of NumericTextbox. Set this property to the desired id (for ex; NTB) and use it on client side to align the text.

NTB.GetTextBox().style.textAlign= "left";

Regards,
Bhuvana

Loader.
Up arrow icon