This question is locked. New answers and comments are not allowed.
Hi,
I'm having trouble in doing grouping, sorting in the Grid with the data I rendered from the Data layer.
In my application I have 8 combo boxes (values in the combo box get added thru a dynamic query), when the user selects the values from the combo box and clicks Retrieve button a query is dynamically generated and that fills up the Grid, the problem that i'm having is i'm not able to sort or group the grid, whenever I try to do that the grid does a post back and then all the data in the grid is gone.
here's my code
View.aspx
Controller.cs
Thanks,
Kamil
I'm having trouble in doing grouping, sorting in the Grid with the data I rendered from the Data layer.
In my application I have 8 combo boxes (values in the combo box get added thru a dynamic query), when the user selects the values from the combo box and clicks Retrieve button a query is dynamically generated and that fills up the Grid, the problem that i'm having is i'm not able to sort or group the grid, whenever I try to do that the grid does a post back and then all the data in the grid is gone.
here's my code
View.aspx
<%: Html.Telerik().Grid<ForwardTidModel>("FTGrid") .Name("DocSummaryGrid") .Pageable(paging => paging.Enabled(true).PageSize(20)) .Sortable(sorting => sorting.Enabled(true)) .Filterable(f => f.Enabled(false)) .Groupable(g => g.Enabled(true)) %>public ActionResult DocumentSummary() { return View(); } [GridAction] [AcceptVerbs(HttpVerbs.Post)] public ActionResult DocumentSummary(FormCollection form) { StringDictionary dict = new StringDictionary(); ComboBoxService temp = new ComboBoxService(); string combo = Settings.stringValueWithDefault("ComboItems", "1CMB,2CMB,3CMB,4CMB,5CMB,6CMB,7CMB,8CMB"); string[] comboColumns = null; if (!string.IsNullOrEmpty(combo)) { comboColumns = combo.Split(','); } if (comboColumns != null) foreach (string c in comboColumns) { dict.Add(c, form[c]); } ViewData["FTGrid"] = temp.GetRecordForwardTid(dict, true, true).ToList(); return View(); }Kamil