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

[Solved] Custom commands conflict with sorting

4 Answers 120 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bob
Top achievements
Rank 1
Bob asked on 16 Feb 2011, 08:28 PM
I have implemented edit, delete, insert, and save options for my grid, using custom commands.

I am now unable to sort without getting the error:

The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult SelectLobbyist(Int32)' in 'L5Lobbying.Controllers.L5LobbyingController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Parameter name: parameters

Does using custom commands preclude sorting? If not, what do I have to do to accomodate sorting while using a custom Select command with parameters and logic I want for processing the commands? I don't want the logic I use in selecting an item to edit to be used in sorting.

Thanks,

Bob

4 Answers, 1 is accepted

Sort by
0
Bob
Top achievements
Rank 1
answered on 23 Feb 2011, 10:53 PM
Hello Telerik! It has been a week, and I have had no response at all. Atanas Korchev must be gone...

Does using custom edit/delete commands in a grid break sorting, filtering, grouping, and paging? I need to know...

I enclose a zip of a test project that demonstrates the problem. It will do all of the CRUD functions, but it won't sort, filter, group, or page without errors. Is there any way to have both custom edit/delete commands and sorting/filtering/grouping/paging?
0
Bob
Top achievements
Rank 1
answered on 25 Feb 2011, 10:16 PM
Never mind. I believe I have found the problems I have been experiencing. They were due to a lack of understanding of Grid Editing. Now that I understand Grid Editing better, I am able to do what I need to do.

Thanks,

Bob
0
Will Ferguson
Top achievements
Rank 1
answered on 28 Feb 2011, 05:40 AM
Can you share your findings with me. I have had the same experience.
0
Bob
Top achievements
Rank 1
answered on 28 Feb 2011, 04:06 PM
Hi Will,

I didn't underestand how editing works. Check out the demo on editing. It shows how editing is done using ajax - not as I had expected - and the calls to Select, Insert, etc, DO reference just the row of the grid being edited or deleted. When done this way, sorting, filtering, and paging still work. The key is that the Select, Insert, and delete commands do not bring up a new window (unless editing in popup mode, but then the window is one that you don't need to define).

I hope this helps,

Bob
Tags
Grid
Asked by
Bob
Top achievements
Rank 1
Answers by
Bob
Top achievements
Rank 1
Will Ferguson
Top achievements
Rank 1
Share this question
or