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

RadGrid ItemStyle Padding-Right

3 Answers 638 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael Hurse
Top achievements
Rank 1
Michael Hurse asked on 23 Jan 2009, 07:41 AM
Hi
A bit of a newbie question so should be quick to answer. I have created a radgrid with some columns with numeric data that also have filters. I have aligned these columns right but that leaves my text aligned with the filter symbol. I would like to add right padding to the cells so that the text is indented. I have applied a CssClass which works for font, background etc but I din't have any success when using the padding-right statement. Here is my code:

ASPX

 

<ItemStyle CssClass="ItemCellPad" />

 


CSS

.ItemCellPad

{

 

padding-right:10px;

 

}


What am I doing wrong??

cheers

Michael

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Jan 2009, 10:27 AM
Hello Michael,

Try adding the !important keyword to the code as shown below:
css:
 <style type="text/css"
  .ItemCellPad
    { 
       text-align:right;        
       padding-right:40px !important
    }     
  </style> 

The !important keyword  is used so that the corresponding appearance setting will dominate over the style specified in the Styles.css file of the chosen skin.

Thanks
Princy.
0
Michael Hurse
Top achievements
Rank 1
answered on 24 Jan 2009, 12:52 AM
Hey Princy, thank you so much. I would never have worked that out in a million years I couldn't find any references to that in my searches. Thanks again, Michael
0
Thomas
Top achievements
Rank 1
answered on 04 Jan 2011, 09:42 PM
This is excellent; This fixed a problem I was having.

Thanks a Million!
Tags
Grid
Asked by
Michael Hurse
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Michael Hurse
Top achievements
Rank 1
Thomas
Top achievements
Rank 1
Share this question
or