Oct 03, 2013, 5:02 PM
[CLOSED] Change the Checkbox selection model (MVC Razor)
Hi guys,
I have a gridpanel which is created using a checkbox selection model in "MULTI" mode and CheckOnly. I'm trying to change the gridpanel checkbox selection model from a controller action to make it "SINGLE" and full row select. The grid is bound by ID to a Store which is loaded via AjaxProxy from an Api controller. So far I have tried .....
I have a gridpanel which is created using a checkbox selection model in "MULTI" mode and CheckOnly. I'm trying to change the gridpanel checkbox selection model from a controller action to make it "SINGLE" and full row select. The grid is bound by ID to a Store which is loaded via AjaxProxy from an Api controller. So far I have tried .....
var gp = X.GetCmp<GridPanel>("PERFORMANCE_CRITERIA_GRID_PANEL_ID");
gp.SelectionModel.Clear();
CheckboxSelectionModel csm = new CheckboxSelectionModel();
csm.Mode = SelectionMode.Single;
csm.CheckOnly = false;
csm.InjectCheckbox = "last";
gp.SelectionModel.Add(csm);
gp.StoreID = "SUBMIT_EVIDENCE_STORE_ID";
gp.Render();
..... but that results in the gridpanel disappearing totally! Is there any MVC examples? Can I do what I want in this way? As an aside, would it be possible to change from a CheckboxSelection model to a RowSelection model by similar means?
Last edited by Daniil; Oct 08, 2013 at 6:48 AM.
Reason: [CLOSED]