Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Gridview PagerStyle CssClass property not workingGridview PagerStyle CssClass property not working
Previous
 
Next
New Post
5/8/2007 2:29 AM
 

Some inline CSS styles are inserted in the pager specific code. This style is applied because you change the layout or font or something else using the VS designer and VS insert these styles in the HTML.

The inline styles are overriding the CSS class styles. If you will remove the inline style attribute then you will see actual CSS class attributes applied.

Hope you will understand it. Highlighted code should be removed.

<tr class="NormalBold" align="left" valign="bottom" style="color:#FFFFFF;background-color:#999999;border-color:#000000;border-style:None;font-size:8pt;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>
     </table></td>
    </tr>

If you will remove this code. Hopefully you will get the required results.


"Knowledge Sharing Matters!"
 
New Post
5/8/2007 9:24 AM
 

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

 

 


Hilbert Solutions, LLC
Owner, Hilbert Solutions, LLC
http://www.HilbertSolutions.com
A DNN Service Provider
From Module Development to DNN Upgrades, your one stop DNN Shop
 
New Post
5/10/2007 10:00 AM
 

Anyone else ever have problems with the GridView pager style?

 

Stuart


Hilbert Solutions, LLC
Owner, Hilbert Solutions, LLC
http://www.HilbertSolutions.com
A DNN Service Provider
From Module Development to DNN Upgrades, your one stop DNN Shop
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Gridview PagerStyle CssClass property not workingGridview PagerStyle CssClass property not working


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out