how can I Multiselection with checkbox?
Hi,
I need multi selection grid with checkbox.
please help me.
thanks in advance
jeeva
October 19,
Could you explain further?
Does obj.setCellTemplate(new AW.Templates.Checkbox, 0); satisfy?
Paul Tiseo
March 24,
There is already a selection mode for that...
myGrid.setSelectionMode("multi-row-marker"); myGrid.setSelectionMultiple(true);
It puts a checkbox in the first grid column for every row (if the cell already has a text, the checkbox is preppended to it) and changes the regular row selection behavior so that, in order to select a row, you have to mark its checkbox.
[ ]'s
Diego Vilar
March 24,
Tried it. Can't see the checkboxes. I'm assuming it's CSS issues, but I can't track it down... If I use:
obj.setSelectorVisible( true );
obj.setSelectorText( function(i){return this.getRowPosition(i)+1} );
obj.setSelectionMode( "multi-row-marker" );
obj.setSelectionMultiple( true );
I can see the number, but not the check box.
Paul Tiseo
March 27,
I'll add that if I comment out setSelectorText(), I still don't see the checkbox.
Paul Tiseo
March 27,
It should be enough setting selection mode to "multi-row-marker". By default this call puts CheckedItem template to the first column (not selector column). Here is the complete example -
var obj = new AW.UI.Grid;
obj.setCellData(function(c, r){return c + "." + r});
obj.setHeaderText("header");
obj.setColumnCount(10);
obj.setRowCount(100);
obj.setSelectionMode("multi-row-marker");
obj.onSelectedRowsChanged = function(arrayOfRowIndices){
window.status = arrayOfRowIndices;
}
document.write(obj);
Alex (ActiveWidgets)
March 27,
Ah! I see. I thought the checkbox would end up in the selector column and I kept trying to find it. I also had a:
obj.setCellTemplate(new AW.Templates.Checkbox, 0);
which prevented me from seing the behavior you describe, Alex. Or, at least, confused the issue. Once I commented that out, I saw that a checkbox was added by the obj.setSelectionMode( "multi-row-marker" ) call.
Thanks.
Paul Tiseo
March 27,
Not to confuse you more but - there are actually two 'checkbox' templates - AW.Templates.Checkbox and AW.Templates.CheckedItem. The first one is used to display Boolean data values in cells, the other one is used for selection. The templates look the same but differ in where the true/false value comes from.
Alex (ActiveWidgets)
March 27,
Hi,
I am using the multi-row-marker grid appearing with checkbox. It is working fine. But, how I can get the data for marked rows?
Avinash Deshmukh
August 13,
Why when i marked a row in the GRID, the scrollbar back at begin?
Anderson RS, Brazil.
August 13,
Hi Alex,
We have a grid in which I want to multirow marker to copy the data from web grid to excel using Ctrl+c events.I want want my grid to be editable so that user can edit some columns and save the changes to data store.
Can I use my grid to be editable as well as multi row marked.?
Thanks
Vikramaditya Garg
Vikramaditya Garg
August 22,
I am also looking for this feature. Can the grid be editable as well as multi row marked.?
thanks
Raj Nair
August 23,