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

[Solved] Paging navigation styling

2 Answers 127 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sean Severson
Top achievements
Rank 1
Sean Severson asked on 04 Nov 2009, 04:18 PM
I have noticed that when no skin is selected for a RadGrid, the div containing "go first and go previous" paging buttons does not have a class assigned.  The div for the page numbers and the div for the "go next and go last" buttons do have classes (rgNumPart and rgArrPart2).  Is this a bug?  Is there another way to set the style on the div containing the "go first and go previous" paging buttons without creating a custom skin?

I have included a screen shot from IE Developer toolbar showing the Div without the class assignment highlighted in gray.

Sincerely,

Sean M. Severson

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 05 Nov 2009, 07:15 AM
Hello Sean,

You can set the styles for the first and previous section of the pager row of your grid from code behind as shown below:
c#:
 protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridPagerItem) 
        { 
            GridPagerItem pager = (GridPagerItem)e.Item; 
            ((Panel)pager.FindControl("ctl01")).CssClass = "myClass"
        } 
    } 

css:
.myClass 
  background-color:red

Thanks
Princy.
0
Sean Severson
Top achievements
Rank 1
answered on 05 Nov 2009, 03:08 PM
Princy,

Your suggested did the trick.  Thanks!

Sean M. Severson
Tags
Grid
Asked by
Sean Severson
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Sean Severson
Top achievements
Rank 1
Share this question
or