Hi,
i have a grid with single row selection.
On a button i dynamically show a column (<ej:Column Width="50" Visible="false"></ej:Column>)
and set it's type property to checkbox
var obj = $("#GridMaster").ejGrid("instance");
obj.model.columns[1].type = "checkbox"
obj.model.columns[1].visible = true;
obj.refreshTemplate();
It all works well and i can then select multiple rows via checkbox column.
But when i try to revert back to single selection however i cannot select any rows because the grid still waits for rows to be selected by checkbox column which is now hidden and it's type is null as it was when the grid was first created.
This is the code:
if (obj.model.columns[1].type == "checkbox") {
obj.model.columns[1].type = null;
obj.model.columns[1].visible = false;
obj.model.selectionType = "single"
obj.model.enableAutoSaveOnSelectionChange = true;
obj.model.selectionSettings.enableToggle = false;
obj.refreshTemplate();
};
How to achieve this to work?