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

ClientSelectColumn Alignment

2 Answers 21 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Albert Shenker
Top achievements
Rank 1
Veteran
Albert Shenker asked on 13 Aug 2009, 09:34 AM

This is minor issue, but I have always had problems trying to get the ClientSelectColumn checkboxes center justified in their column. I have the following markup for the column:

I thought that it might have to do with some extra padding, so I tried to apply a style that got rid of padding, but that didn't seem to do much. I have to set the column width to at least 40px to get the checkboxes to appear even close to centered. This causes quite a bit of wasted space to the left and right of the checkboxes.

<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" Resizable="False" > 
                <ItemStyle width="40px" HorizontalAlign="Center" VerticalAlign="Middle" CssClass="GridSelectColumnItem" ></ItemStyle>  
                <HeaderStyle width="40px" HorizontalAlign="Center" VerticalAlign="Middle" BorderStyle="None"></HeaderStyle> 
            </telerik:GridClientSelectColumn> 
 
the style shown is:  
 
.GridSelectColumnItem   
{  
    padding:0;  
    margin:0;  

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 1
answered on 13 Aug 2009, 10:12 AM
Hi Albert,

Try modifying the CssClass applied for the ItemStyle as shown below and see whether the CheckBoxes are getting center aligned.

Style.Css:
 
<style type="text/css" > 
     .GridSelectColumnItem 
     { 
      padding-left:20px !important; 
      padding-right:20px !important; 
     } 
    </style> 

Thanks
Shinu
0
Albert Shenker
Top achievements
Rank 1
Veteran
answered on 13 Aug 2009, 10:29 AM
Thanks for the suggestion! I changed my column width to 30px and set the left/right padding to 5pxand that seemed to do the trick.
Tags
Grid
Asked by
Albert Shenker
Top achievements
Rank 1
Veteran
Answers by
Shinu
Top achievements
Rank 1
Albert Shenker
Top achievements
Rank 1
Veteran
Share this question
or