I am still having issues. I setup the grid so that if I put in a cssClass than no other attributes are applied to the pagerstyle. Also if you don't specify a CssClass then all attributes specified will be displayed.
This approach works in the fact that the styles are removed appropriately. However the PagerStyle refuses to work properly.
In this first example I am setting the attributes with no cssClass specified. Some attributes are picked up, but the size attribute does not work.
<tr align="left" valign="bottom" style="color:#FFFFFF;background-color:#999999;border-color:#000000;border-style:None;font-size:2pt;font-weight:bold;font-style:normal;text-decoration:none;">
<td colspan="3"><table border="0">
<tr>
<td><span>1</span></td><td><a href=" __doPostBack('dnn$ctr394$ViewUserDirectory$grdDirectory','Page$2')" style="color:#FFFFFF;">2</a></td>
</tr>
In this next example I only have the cssClass being displayed. I am using the NormalBold class which works if I apply the style to a gridrow.
<tr class="NormalBold">
<td colspan="3"><table border="0">
<tr>
<td><span>1</span></td><td><a href=" __doPostBack('dnn$ctr394$ViewUserDirectory$grdDirectory','Page$2')" style="color:#000000;">2</a></td>
</tr>
</table></td>
</tr>
Here is the code I am using to apply the style..
If CType(Settings("pagercssclass"), String) <> "" ThenCType(Settings("pagercssclass"), String)ElseIf CType(Settings("pagerheight"), String) <> "" Then
grdDirectory.PagerStyle.Height =
CType(Settings("pagerheight"), String)End If
If CType(Settings("pagerwidth"), String) <> "" Then
grdDirectory.PagerStyle.Width =
CType(Settings("pagerwidth"), String)End If
If CType(Settings("pagerbackgroundcolor"), String) <> "" Then
grdDirectory.PagerStyle.BackColor = System.Drawing.ColorTranslator.FromHtml(
CType(Settings("pagerbackgroundcolor"), String))End If
If CType(Settings("pagerforegroundcolor"), String) <> "" Then
grdDirectory.PagerStyle.ForeColor = System.Drawing.ColorTranslator.FromHtml(
CType(Settings("pagerforegroundcolor"), String))End If
If CType(Settings("pagerborderstyle"), String) <> "" Then
grdDirectory.PagerStyle.BorderStyle =
CType(Settings("pagerborderstyle"), Integer)End If
If CType(Settings("pagerborderwidth"), String) <> "" Then
grdDirectory.PagerStyle.BorderWidth =
CType(Settings("pagerborderwidth"), String)End If
If CType(Settings("pagerbordercolor"), String) <> "" Then
grdDirectory.PagerStyle.BorderColor = System.Drawing.ColorTranslator.FromHtml(
CType(Settings("pagerbordercolor"), String))End If
If CType(Settings("pageralignmenthorizontal"), String) <> "" Then
grdDirectory.PagerStyle.HorizontalAlign =
CType(Settings("pageralignmenthorizontal"), Integer)End If
If CType(Settings("pageralignmentvertical"), String) <> "" Then
grdDirectory.PagerStyle.VerticalAlign =
CType(Settings("pageralignmentvertical"), Integer)End If
If CType(Settings("pagerwrap"), String) <> "" Then
grdDirectory.PagerStyle.Wrap =
CType(Settings("pagerwrap"), String)End If
If CType(Settings("pagerbold"), String) <> "" Then
grdDirectory.PagerStyle.Font.Bold =
CType(Settings("pagerbold"), String)End If
If CType(Settings("pageritalic"), String) <> "" Then
grdDirectory.PagerStyle.Font.Italic =
CType(Settings("pageritalic"), String)End If
If CType(Settings("pageroverline"), String) <> "" Then
grdDirectory.PagerStyle.Font.Overline =
CType(Settings("pageroverline"), String)End If
If CType(Settings("pagerstrikeout"), String) <> "" Then
grdDirectory.PagerStyle.Font.Strikeout =
CType(Settings("pagerstrikeout"), String)End If
If CType(Settings("pagerunderline"), String) <> "" Then
grdDirectory.PagerStyle.Font.Underline =
CType(Settings("pagerunderline"), String)End If
If CType(Settings("pagersize"), String) <> "" Then
grdDirectory.PagerStyle.Font.Size =
CType(Settings("pagersize"), String)End If
End If
Is this a bug, or I am doing something wrong?
Thank You,
Stuart
grdDirectory.PagerStyle.CssClass =
'Loading Row pager Style