We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Column alignment

Hi,

The column horiz alignment does not seem to apply

I am using

AlternativeStyle-HorizontalAlign="Right" Style-HorizontalAlign="Right"

in the column definition on the page and it does not get applied.

Other styles such as back color do get applied.

What is the correct way to specify a column as right aligned?

Rod

Hi Rod,

Do you set the alignment for bound column(s). I have tested and it works fine. I am using the recent version (2.0.0.2001) of the GridWeb control.

Here is the piece of my .html source of the webform:

<agw:gridweb id="GridWeb1" runat="server" XhtmlMode="True" PageSize="500" ScrollBarBaseColor="#CCCCFF" ScrollBarArrowColor="White" ActiveHeaderColor="#CCCCFF" DefaultGridLineColor="#CFCFFF" PresetStyle="Professional1" ActiveTabStyle-Height="15pt" ActiveTabStyle-BorderWidth="1px" ActiveTabStyle-Font-Size="10pt" ActiveTabStyle-Font-Names="Arial" ActiveTabStyle-BorderColor="#004466" ActiveTabStyle-BorderStyle="Solid" ActiveTabStyle-ForeColor="#003344" ActiveTabStyle-BackColor="#CCCCFF" ActiveTabStyle-Wrap="False" ActiveCellBgColor="#DDDDFF" TabStyle-Height="15pt" TabStyle-BorderWidth="1px" TabStyle-Font-Size="10pt" TabStyle-Font-Names="Arial" TabStyle-BorderColor="#004466" TabStyle-BorderStyle="Solid" TabStyle-ForeColor="White" TabStyle-BackColor="#006699" TabStyle-Wrap="False" HeaderBarTableStyle-LayoutFixed="Fixed" HeaderBarTableStyle-BorderWidth="0px" HeaderBarTableStyle-BorderCollapse="Collapse" ActiveHeaderBgColor="#0088BB" HeaderBarStyle-VerticalAlign="Middle" HeaderBarStyle-BorderWidth="1px" HeaderBarStyle-Font-Size="10pt" HeaderBarStyle-Font-Names="Arial" HeaderBarStyle-BorderColor="#CCCCFF" HeaderBarStyle-BorderStyle="Solid" HeaderBarStyle-HorizontalAlign="Center" HeaderBarStyle-ForeColor="#CCCCFF" HeaderBarStyle-BackColor="#006699" HeaderBarStyle-Wrap="False" BottomTableStyle-LayoutFixed="Fixed" BottomTableStyle-Height="20pt" BottomTableStyle-BorderWidth="0px" BottomTableStyle-BorderCollapse="Collapse" BottomTableStyle-TopBorderStyle-BorderStyle="Solid" BottomTableStyle-TopBorderStyle-BorderWidth="1px" BottomTableStyle-TopBorderStyle-BorderColor="#006699" BottomTableStyle-BackColor="#BBBBFF" ViewTableStyle-LayoutFixed="Fixed" ViewTableStyle-BorderWidth="0px" ViewTableStyle-BorderCollapse="Collapse" SelectCellBgColor="#EEEEFF" FrameTableStyle-BorderStyle="Solid" FrameTableStyle-LayoutFixed="Fixed" FrameTableStyle-BorderWidth="1px" FrameTableStyle-BorderColor="#0077AA" FrameTableStyle-BorderCollapse="Collapse" FrameTableStyle-BackColor="White" OnCustomCommand="GridWeb1_CustomCommand" OnSaveCommand="GridWeb1_SaveCommand">

<WebWorksheets>

<agw:Worksheet DataMember="Products" BindStartRow="2" Name="Products" EnableCreateBindColumnHeader="True" DataSource='<%# dataSet11 %>' runat="server">

<BindColumns>

<agw:BindColumn IsAutoCreated="True" Caption="ProductID" DataField="ProductID" CommandName="" CommandText="" CustomFormat="" ImageUrl="" NumberType="Decimal1">

<Style BorderWidth="1px" BorderColor="#CFCFFF" BorderStyle="Solid" BackColor="#A0A0FF">

</Style>

<Validation ValidationType="Integer" IsRequired="True"></Validation>

<ColumnHeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" ForeColor="#E0E0E0" BackColor="Teal"></ColumnHeaderStyle>

<AlternativeStyle HorizontalAlign=Right BorderWidth="1px" BorderColor="#CFCFFF" BorderStyle="Solid" BackColor="#C0C0FF"></AlternativeStyle>

</agw:BindColumn>

.....................................

Thank you.

Thanks Amjad,

I'll try the new version.

We have css and the like that may be overrriding the style, I will start from scratch with the design