This is a migrated thread and some comments may be shown as answers.

CssClass for Width & Alignment

1 Answer 185 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rich
Top achievements
Rank 1
Rich asked on 16 Jul 2009, 03:50 PM
Is it possible to create a set of CSS classes to define a column's width and alignment to use with different data types such as buttons, currency, numbers, and checkboxes.

Thanks,
Rich

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 Jul 2009, 07:24 AM
Hello Rich,

You set various style for columns declaratively as shown below:
aspx:
 
<telerik:GridNumericColumn DataField="Price" HeaderText="Price">                         
    <HeaderStyle CssClass="class" Width="100px"/> 
    <ItemStyle CssClass="class"/> 
</telerik:GridNumericColumn> 
<telerik:GridTemplateColumn> 
    <HeaderStyle CssClass="class" Width="100px"/> 
    <ItemStyle CssClass="class"/>                             
    <ItemTemplate> 
        <asp:Button ID="Button1" runat="server" Text="Button" /> 
    </ItemTemplate>                            
</telerik:GridTemplateColumn> 
                   
css:
 .class 
   { 
     text-alignrightright !important;  
   } 

Thanks
Princy.
Tags
Grid
Asked by
Rich
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or