I have just installed the latest release of RadControls with RadGrid from April 2, and tested again, and still have the same problem.
The Vista skin NextPrevAndNumeric pager is working in so far as it's possible to change pages from first to last as long as I do not change the page size. But if I try to change the page size from the default of 10 to either option of 20 or 50 nothing happens.
I turned off AJAX by setting EnableAJAX to false in the RadAjaxManager and tried regular postbacks to see if that would make a difference but it did not.
Any suggestions? Thanks.
The Vista skin NextPrevAndNumeric pager is working in so far as it's possible to change pages from first to last as long as I do not change the page size. But if I try to change the page size from the default of 10 to either option of 20 or 50 nothing happens.
I turned off AJAX by setting EnableAJAX to false in the RadAjaxManager and tried regular postbacks to see if that would make a difference but it did not.
Any suggestions? Thanks.
7 Answers, 1 is accepted
0
Hi Carl,
In order to display the grid pager regardless of the number of records returned and the page size, you should set the PagerStyle -> AlwaysVisible property of the corresponding GridTableView to true. Its default value is false.
I am sending you a small runnable application with the implementation request by you. Give it a try and let me know if it works for you.
More information about Next/Prev and Numeric pager is available in the following article:
Basic Paging
I hope this helps.
All the best,
Pavlina
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
In order to display the grid pager regardless of the number of records returned and the page size, you should set the PagerStyle -> AlwaysVisible property of the corresponding GridTableView to true. Its default value is false.
I am sending you a small runnable application with the implementation request by you. Give it a try and let me know if it works for you.
More information about Next/Prev and Numeric pager is available in the following article:
Basic Paging
I hope this helps.
All the best,
Pavlina
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Carl
Top achievements
Rank 1
answered on 06 Apr 2009, 02:43 PM
When I wrote that "nothing happens" I meant that the page size control fails to change the number of records on the page from the default of 10 to any of the other options whether 20 or 50.
I did not mean that the pager control is not visible. In fact, all parts of the pager control are always visible, and that is not the problem.
As clearly as I can state it, the problem is that the page size control (with options of 10, 20, 50 records per page) does not work. It fails to change the number of records per page, but the page size control itself is always visible.
I did not mean that the pager control is not visible. In fact, all parts of the pager control are always visible, and that is not the problem.
As clearly as I can state it, the problem is that the page size control (with options of 10, 20, 50 records per page) does not work. It fails to change the number of records per page, but the page size control itself is always visible.
0
Hi Carl,
Would you please look at the sample, which I sent you in the previous post. Give it a try and see if it work for you or if I am leaving something out.
Additionally, if you continue to experience difficulties it will be best if you open a formal support ticket and send us a small runnable application that isolates the problem, so we can check it.
Sincerely yours,
Pavlina
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Would you please look at the sample, which I sent you in the previous post. Give it a try and see if it work for you or if I am leaving something out.
Additionally, if you continue to experience difficulties it will be best if you open a formal support ticket and send us a small runnable application that isolates the problem, so we can check it.
Sincerely yours,
Pavlina
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Carl
Top achievements
Rank 1
answered on 08 Apr 2009, 07:51 PM
Yes, I did look at the sample. And I see that your datasource in the sample is read only with only a select command.
And yes, for me as well, the Vista skin NextPrevAndNumeric pager page size control has always worked on a page where the SqlDataSource was read only with only select parameters and select stored procedure.
But it has NEVER worked for me on a page where the SqlDataSource is read/write with select, insert, update, delete parameters and corresponding stored procedures. But why should that cause the pager to fail?
When I attempt to change the page size from 10 to 20 or 50, the browser status bar briefly shows "Error on page" but I am unclear how to debug. I have turned on debugging and also tracing, but have not found any helpful information. What is the best way to debug this problem?
And yes, for me as well, the Vista skin NextPrevAndNumeric pager page size control has always worked on a page where the SqlDataSource was read only with only select parameters and select stored procedure.
But it has NEVER worked for me on a page where the SqlDataSource is read/write with select, insert, update, delete parameters and corresponding stored procedures. But why should that cause the pager to fail?
When I attempt to change the page size from 10 to 20 or 50, the browser status bar briefly shows "Error on page" but I am unclear how to debug. I have turned on debugging and also tracing, but have not found any helpful information. What is the best way to debug this problem?
0
Hi Carl,
Unfortunately we can not determine the exact cause for the issue you encountered without a working project which demonstrates it. Please open a formal support ticket and send us a small runnable application that isolates the problem. We will examine it in detail and will get back to you with additional information/suggestions.
Sincerely yours,
Pavlina
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Unfortunately we can not determine the exact cause for the issue you encountered without a working project which demonstrates it. Please open a formal support ticket and send us a small runnable application that isolates the problem. We will examine it in detail and will get back to you with additional information/suggestions.
Sincerely yours,
Pavlina
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Carl
Top achievements
Rank 1
answered on 11 Apr 2009, 07:03 PM
After much work, I was eventually able to track down the cause of the problem:
The Change Page Size control not only triggers the telRadGrid.PageSizeChanged event but also the telRadGrid.ItemCommand event. And that's where the problem is... the Telerik.Web.UI.GridCommandEventArgs can be very different depending on what triggers the telRadGrid.ItemCommand event. So if the developer has not coded this subroutine to handle all possibilities, then it will bomb.
I have re-coded the subroutine so that it checks e.CommandName the very first thing. In the case of the Page Size control, it is necessary to check for an actual string "ChangePageSize" rather than an enumerated constant because RadGrid.ChangePageSizeCommandName does not exist (analogous to other enumerated values like RadGrid.UpdatedCommandName).
Also, it has left me with the feeling that the telRadGrid.ItemCommand has been used for too many things and so has become so prone to bugs and problems. Why isn't there a consistent set of events for each CRUD operation on the RadGrid? For each of Select, Insert, Update, and Delete? Analogous to the way that they exist for other controls like the SqlDataSource controls?
It is inconsistent and confusing because there is a RadGrid.InitInsertCommandName and a RadGrid.PerformInsertCommandName but no corresponding event subroutines other than telRadGrid.InsertCommand. Or am I missing something here and have not understood???
Greater consistency would lend itself to better understanding and fewer bugs. And making clear what events get triggered for what controls would also help? Why shouldn't the Page Size control only fire the telRadGrid.PageSizeChanged event by default? Or do ALL controls always also fire the telRadGrid.ItemCommand? If so, then that subroutine is forced to check for many different event args and many different possibilities causing a higher likelihood of bugs. Or again maybe I'm just failing to understand a basic concept here.....
The Change Page Size control not only triggers the telRadGrid.PageSizeChanged event but also the telRadGrid.ItemCommand event. And that's where the problem is... the Telerik.Web.UI.GridCommandEventArgs can be very different depending on what triggers the telRadGrid.ItemCommand event. So if the developer has not coded this subroutine to handle all possibilities, then it will bomb.
I have re-coded the subroutine so that it checks e.CommandName the very first thing. In the case of the Page Size control, it is necessary to check for an actual string "ChangePageSize" rather than an enumerated constant because RadGrid.ChangePageSizeCommandName does not exist (analogous to other enumerated values like RadGrid.UpdatedCommandName).
Also, it has left me with the feeling that the telRadGrid.ItemCommand has been used for too many things and so has become so prone to bugs and problems. Why isn't there a consistent set of events for each CRUD operation on the RadGrid? For each of Select, Insert, Update, and Delete? Analogous to the way that they exist for other controls like the SqlDataSource controls?
It is inconsistent and confusing because there is a RadGrid.InitInsertCommandName and a RadGrid.PerformInsertCommandName but no corresponding event subroutines other than telRadGrid.InsertCommand. Or am I missing something here and have not understood???
Greater consistency would lend itself to better understanding and fewer bugs. And making clear what events get triggered for what controls would also help? Why shouldn't the Page Size control only fire the telRadGrid.PageSizeChanged event by default? Or do ALL controls always also fire the telRadGrid.ItemCommand? If so, then that subroutine is forced to check for many different event args and many different possibilities causing a higher likelihood of bugs. Or again maybe I'm just failing to understand a basic concept here.....
0
Hi Carl,
Indeed, whenever a event is fired/bubbles from within a RadGrid, the ItemCommand event fires. Furthermore, each grid child control that have set CommandName raises the ItemCommand event. Thus you could handle each action performed in a RadGrid, including any custom command. However, as you already noticed, you should to perform a check which command is raised.
Regarding the command names: You are right that some command names are not predefined in RadGrid. But you could still find a list with all predefined names here.
Command reference (Event bubbling in Telerik RadGrid)
Note that RadGrid has separate SelectCommand, InsertCommand, UpdateCommand, CancelCommand, PageIndexChanged, SortCommand, GroupsChanging, SelectedIndexChanged event which you could handle the corresponding particular actions.
Additionally, you can review this help article:
RadGrid / Event sequence
I hope this helps.
Regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Indeed, whenever a event is fired/bubbles from within a RadGrid, the ItemCommand event fires. Furthermore, each grid child control that have set CommandName raises the ItemCommand event. Thus you could handle each action performed in a RadGrid, including any custom command. However, as you already noticed, you should to perform a check which command is raised.
Regarding the command names: You are right that some command names are not predefined in RadGrid. But you could still find a list with all predefined names here.
Command reference (Event bubbling in Telerik RadGrid)
Note that RadGrid has separate SelectCommand, InsertCommand, UpdateCommand, CancelCommand, PageIndexChanged, SortCommand, GroupsChanging, SelectedIndexChanged event which you could handle the corresponding particular actions.
Additionally, you can review this help article:
RadGrid / Event sequence
I hope this helps.
Regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.