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

[Solved] grid skin for Vista and page size combobox

4 Answers 211 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 02 Apr 2009, 10:20 PM
I had a really nice modified version of the Vista Skin for Q3_2008,  I recently upgraded to Q1_2009 and the skins do not work so I am attempting to remodify the Vista skin to get what I want.  So far so good, but how do you make the "pag size" radcombobox dissppear in the pager for the grid without having to create a custom pager template.  I need to capture the event for the pager so I can store the preferred page size (or elminate paging entirely) in the database associated with the  UserID and so have a combobox external to the pager (and grid) where I set the page size..  I otherwise like the Vista Skin's default pager and can't spend the time recreating the default pager in a custom pager template sans combobox as the CSS is unmanageable.  Is there some setting I am missing.

Thoughts?

Thanks
Jonathan

4 Answers, 1 is accepted

Sort by
0
Jonathan
Top achievements
Rank 1
answered on 02 Apr 2009, 11:56 PM
Alright did a bit more digging.  I took the old Q3_2008 Vista skin that telerik upgraded to work with the Q1_2009 and reapplied my old changes and got everything looking the same except for the pager.  What I would like to see is everything one sees using the Pager-Style Mode="NextPrevAndNumeric" but not the "pagesize".  For the previously mentioned reason.  In addition the control is not rendering correctly and I have not touched the "pager" section in the skin.  You can see the problem here:

http://www.jshawconsulting.com/Telerik/pager.gif

What do you suggest?  I'd prefer to avoid custom paging.

Thanks
Jonathan

0
Accepted
Dimo
Telerik team
answered on 03 Apr 2009, 10:46 AM
Hello Jonathan,

In order to make the RadComboBox in the RadGrid pager display correctly, you need to register a custom skin for it, just like you have registered a custom skin for the RadGrid. The skin name must be the same as the RadGrid skin's name.

If you want to remove the RadComboBox completely, or customize its options, you can use the ItemCreated event:

C#

    protected void RadGrid_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridPagerItem) 
        { 
            (e.Item as GridPagerItem).FindControl("ChangePageSizeLabel").Visible = false
            (e.Item as GridPagerItem).FindControl("PageSizeComboBox").Visible = false
        } 
    } 


All the best,
Dimo
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Accepted
Per
Top achievements
Rank 1
answered on 03 Apr 2009, 11:44 AM
Hi Jonathan

We managed to do this by adding the following tag to our css.

.rgAdvPart
{
 visibility:hidden;
}

Maby not the best solution but it hides the advanced section from all grids.
Regards
Per
0
Jonathan
Top achievements
Rank 1
answered on 03 Apr 2009, 03:54 PM
Thanks Dimo and Per.  That would have taken me a long time to figure out.
Cheers
Jonathan
Tags
Grid
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Jonathan
Top achievements
Rank 1
Dimo
Telerik team
Per
Top achievements
Rank 1
Share this question
or