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

[Solved] Using Slider Paging Mode with OnCommand

1 Answer 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chad Thomas
Top achievements
Rank 1
Chad Thomas asked on 11 Mar 2010, 07:45 PM
I have a RadGrid, that uses Paging in Slider Mode.  In the Client Settings I have an OnRowClick Event and an OnCommand Event.  When the OnCommand event is added, I get the following error, each time I page the grid forward with the clider.

Message: Sys.WebForms.PageRequestManagerServerErrorException: Unable to cast object of type 'Telerik.Web.UI.GridTHead' to type 'Telerik.Web.UI.RadSlider'.

If I change the mode to anything other than Slider it seems to work fine.  Also, If I remove the OnCommand event, it works fine.  Am I missing something, or is this a know bug?  Below is a snippet of my RadGrid.

<rad

 

:RadGrid ID="grdPeople" runat="server" DataSourceID="dsPerson" GridLines="None"

 

 

 

AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" PageSize="25"

 

 

 

OnItemCommand="grdPeople_ItemCommand" OnItemDataBound="grdPeople_ItemDataBound" >

 

 

 

<ClientSettings EnableRowHoverStyle="true" >

 

 

 

<ClientEvents OnRowClick="grdPeople_RowClick" OnCommand="grdPeople_Command" />

 

 

 

</ClientSettings>

 

 

 

<PagerStyle Mode="Slider" Position="Top" />

Thanks

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Veli
Telerik team
answered on 12 Mar 2010, 04:38 PM
Hello Chad,

This is an issue with RadGrid and the exception is thrown when the following 3 conditions are met:

1. PagerStyle.Mode = Slider with enabled paging

2. PagerStyle.Position = Top / TopAndBottom

3. ClientSettings.OnCommand event is attached


To work around this exception, it is advisable to not use Slider pager with OnCommand client event. The issue has been scheduled for fixing.

Regards,
Veli
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Chad Thomas
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or