:: Forum >>

how can I Multiselection with checkbox?

Hi,
I need multi selection grid with checkbox.
please help me.

thanks in advance

jeeva
Wednesday, October 19, 2005
I need too
Oscar
Thursday, March 23, 2006
Could you explain further?

Does obj.setCellTemplate(new AW.Templates.Checkbox, 0); satisfy?
Paul Tiseo
Friday, March 24, 2006
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
Friday, March 24, 2006
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
Monday, March 27, 2006
I'll add that if I comment out setSelectorText(), I still don't see the checkbox.
Paul Tiseo
Monday, March 27, 2006
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)
Monday, March 27, 2006
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
Monday, March 27, 2006
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)
Monday, March 27, 2006
Good to know. Thanks.
Monday, March 27, 2006
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
Sunday, August 13, 2006
Why when i marked a row in the GRID, the scrollbar back at begin?
Anderson RS, Brazil.
Sunday, August 13, 2006
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
Tuesday, August 22, 2006
I am also looking for this feature. Can the grid be editable as well as multi row marked.?

thanks
Raj Nair
Wednesday, August 23, 2006

This topic is archived.


Back to support forum

Forum search