checkbox in Listgrid

Hi,

I 've checkbox in my listgrid.
the requirment is that some processing is to be done on the rows with selected checkboxes(multiple rows can be selected)

isc.ListGrid.create({
    ID: "searchBuildList",
             width:"100%",
	height:"70%",
	alternateRecordStyles:true,
             dataSource: buildList,
	border:"2px solid #183C6B",
	headerProperties : {overflow:"visible"},
	autoDraw:true,
	canEdit:true,
	margin:10,
	booleanTrueImage:"/LiquidBridge/images/checked.png",
             booleanFalseImage:"/LiquidBridge/images/unchecked.png",

	fields:[
		{ name:"", title:"" ,canEdit:true,  width:"10%",align:"center",
			type:"boolean",canToggle:true,
			editorProperties : {
			   recordClick  : function (viewer, record, recordNum, field, fieldNum, value, rawValue) {
				 
			   }
			}

		},
        {name:"source", title:"Source",canEdit:false, width:"30%"},
        {name:"attribute", title:"Attribute",canEdit:false, width:"30%"},
        {name:"instrument", title:"Instrument",canEdit:false, width:"35%"}
    ],
	//recordClick: "recordClicked(record);",
    autoFetchData: true,
    bodyOverflow: "visible",
    overflow: "visible",
    leaveScrollbarGap: false,
    showFilterEditor: true,
	selectionType: "multiple",
	canEditCell : function (rowNum, colNum) {
	if(colNum == 0)
            var canEdit = this.Super("canEditCell", arguments);
      // do your custom processing and return a custom value
    // alert(canEdit);
       // otherwise return the returnValue of the superclass implementation
            return canEdit;
      },

    editEvent: "click"



})

Now the checkboxes are getting displayed against all the rows, but when i select the second after selecting first checkbox, the previous one gets deselected.

requirment is that multiple checkboxes should be selected and the rows data should be accessible.

Thanks in advance,
mverma

needed urgently, plz help

i tried providing a data array and it worked, but with datasource its not working.

i need to have a datasource, so do i have to map the checkbox field to some field in datasource.

kindly update

Thanks
mverma

In the default behavior of the grid, the grid will attempt to save to the DataSource every time you move to a new row. What you may be seeing is that the save fails and the value is reverted.

You haven’t shown what kind of DataSource you’re connected to, but, turn on the “ResultSet” log category to see what’s happening when the grid attempts to save and integrate the server’s response into the cache.

Alternatively, set autoSaveEdits:false and saves will not be automatically initiated, which may be what you want anyway. Setting this flag is also a good way to test that the theory above is correct (if it makes the problem go away, then it’s definitely related to saving to the DataSource). Just be sure you understand the distinction between the record values and the edit values discussed in the Grid Editing overview.