I wonder if someone could please help with the following issue I have. This is our last-roll-of-the-dice with Telerik components before we decide to ditch them in favour of our own implementations, everything is just too difficult or example code out-of-date.
Problem
We have decided to move one of our RadGrid test-cases to client-side binding using a web service. Initially starting with [WebMethod]'s in the aspx page we moved to a ASMX service to we could enforce session and reduce the data calls (as detailed in the Telerik demos here); it says:
Simple huh!? No, as web services apparently no longer support IDictionary:
Ultimate goal
What I'm trying to (ideally) achieve here is webservice that returns data two sets of data for (a) mastertableview and (b) detailtable as one call without making secondary calls to get the data count (especially as it will relate to the VirtualItemCount). If this isn't possible I'm happy to make two seperate calls, one for the mastertableview and one for the detail view, but I do not want to make a second call for 'record count' on each of the those calls (thus making 4).
Is this possible or are we better doing something else? Your urgent thoughts on this much appreciated!
Ian
Problem
We have decided to move one of our RadGrid test-cases to client-side binding using a web service. Initially starting with [WebMethod]'s in the aspx page we moved to a ASMX service to we could enforce session and reduce the data calls (as detailed in the Telerik demos here); it says:
| To optimize even more the grid client-side data binding you can get both data and total items count in a single request. Example: |
| ... |
| [WebMethod(EnableSession = true)] |
| public Dictionary<string, object> GetDataAndCount(int startRowIndex, int maximumRows, List<GridSortExpression> sortExpression, List<GridFilterExpression> filterExpression) |
| { |
| Dictionary<string, object> data = new Dictionary<string, object>(); |
| data.Add("Data", GetData(startRowIndex, maximumRows, sortExpression, filterExpression)); |
| data.Add("Count", (int)Session["Count"]); |
| return data; |
| } |
| ... |
Simple huh!? No, as web services apparently no longer support IDictionary:
| The type System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] is not supported because it implements IDictionary. |
Ultimate goal
What I'm trying to (ideally) achieve here is webservice that returns data two sets of data for (a) mastertableview and (b) detailtable as one call without making secondary calls to get the data count (especially as it will relate to the VirtualItemCount). If this isn't possible I'm happy to make two seperate calls, one for the mastertableview and one for the detail view, but I do not want to make a second call for 'record count' on each of the those calls (thus making 4).
Is this possible or are we better doing something else? Your urgent thoughts on this much appreciated!
Ian