Mar 22, 2012, 7:25 PM
How to change gridpanel selection model selection mode (single/multiple) from client side (javascript)?
Hi guys,
Is there a way to change gridpanels selection model using javascript?
Hers is my problem - my target gridpanel is with checkbox selection model (by default single select). It's in an user control page. When using this user control inside an ext window, i want to change selection model's selection mode to multi select based on some conditions.
I tried changing the selection mode from code behind but all without any affect. Possibly a viewstate issue. Here's a snippet i tried, but it resulted the grid to disappear!! :(
Is there a way to change gridpanels selection model using javascript?
Hers is my problem - my target gridpanel is with checkbox selection model (by default single select). It's in an user control page. When using this user control inside an ext window, i want to change selection model's selection mode to multi select based on some conditions.
I tried changing the selection mode from code behind but all without any affect. Possibly a viewstate issue. Here's a snippet i tried, but it resulted the grid to disappear!! :(
grdAuditableUnit.SelectionModel.Clear();
//CheckboxSelectionModel csm = new CheckboxSelectionModel();
//csm.ID = "CheckboxSelectionModel1";
//csm.CheckOnly = false;
//grdAuditableUnit.SelectionModel.Add(csm);
grdAuditableUnit.SelectionModel.Add(new CheckboxSelectionModel { CheckOnly = false });
///grdAuditableUnit.Reconfigure();
grdAuditableUnit.Render();
Any help with small exaple is highly appreciated. Thanks