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. Image for the cookie policy date
close icon

align right data in the column

hi to all, i am using the GridControl and i am trying to align right the data in all the cells of a column. i tried the above line of code but it doesn''t work. gridControl1.ColStyles[4].TextAlign = GridTextAlign.Right; what did i miss ? best regards and thanks in advance fady

2 Replies

AD Administrator Syncfusion Team April 10, 2006 11:15 AM UTC

Hi Fady, The TextAlign property is commonly used to align text left/ right of button elements(which is typical for combo boxes). Use the HorizontalAlignment property to set the alignment of the text in a cell. this.gridControl1.ColStyles[4].HorizontalAlignment = GridHorizontalAlignment.Right; Regards, Calvin.


AD Administrator Syncfusion Team April 10, 2006 11:35 AM UTC

thanks calvin, it works fady >hi to all, > >i am using the GridControl and i am trying to align right the data in all the cells of a column. > >i tried the above line of code but it doesn''t work. >gridControl1.ColStyles[4].TextAlign = GridTextAlign.Right; > >what did i miss ? > >best regards and thanks in advance > >fady

Loader.
Live Chat Icon For mobile
Up arrow icon