Hello!
Is working select:“multiselect” on touch devices? How can I take ctrl+click on an Android device?
Hello!
Is working select:“multiselect” on touch devices? How can I take ctrl+click on an Android device?
Hello,
Is working select:“multiselect” on touch devices? How can I take ctrl+click on an Android device?
Possibly you meant “multiple”, not “multiselect”. Usually Touch devices display checkboxes on the right of options.
However, “select” control of dhtmlxTouch does not support “multiple” attribute. You can create custom control if it is needed:
Thank You Alexadnra for quick reply.
I mean "select: ‘multiselect’ " setting of a grid component, which doesn’t display checkboxes.
Hello,
you can use checkbox as “active content” in one of grid columns. Here is the demo for List:
/samples/04_list/11_active_values.html
You can use the same approach for Grid:
[code]dhx.protoUI({
name:“activeGrid”
}, dhx.ui.grid, dhx.ActiveContent);
dhx.ui({
view: “activeGrid”,
activeContent:{
checked:{
view:“checkbox”
}
},
fields:[
…
{
…
template: “{common.checked()}”
}
]
});[/code]
Thank You Alexandra!
I haven’t had time to try out your solution until now. It is working. But let me take a small addition about select property of the grid. If the select property set to true or multiselect, the grid not work as expected.
[]The checkmark in the checkbox appears after the selection focus leaft the row where you clicked the checkbox.[/]
[]When you click the checkbox in the first row seeming selectAll is called, and all rows becoming selected[/]
But if the select property is false, the behaviour of checkboxes restored and working as expected.
Is it possible to change the behaviour the multiselect property value in next release?
For example,
If the select property set to multiselect and the user clicks in the list or grid on a row which is not selected it will be selected, when clicks again that row it becoming unselected. When user take single clicks on different rows they becoming selected, and can be unselect as defined above.
So multiselect can be done without any additional keypress.
Hello,
We will consider such a “multiselect” behavior. But you can use a on_click event handling with the existent grid to achieve this:
// select an item and preserve previous selection if multiselection is on
$$("yourGrid").on_click["dhx_grid_row"] = function(e,id){
if(this.config.select == "multiselect"){
this.select(id,true);
}
else{
this.select(id);
}
};
// clear selection on click
$$("yourGrid").on_click["dhx_grid_row_selected"] = function(e,id){
if(this.config.select == "multiselect"){
this.unselect(id);
}
};
Please let me know If you need the fix for “active checkboxes” in grid with enabled checkboxes.
Thank You Alexandra!
Excellent solution!
No thanks!
Your solution works on Android as I expected, and I think checkboxes in grid are not as elegant as your code!
Thank You again!
You are welcome !