View Full Version : Can not check the Checkbox in grid

31 Jan 2012, 1:10 AM
Hello Friends,
I am new to ExtJs. Here I am trying to create as selector control which will show some records and user should be able to select one or multiple records by checking the checkbox.
I have created the grid with selModel as Checkboxmodel. When i run the code I can see the data with checkboxes but I can not check the checkboxes. Those appear to be disabled. I have registered a listner on beforerowselect but it doesnt fire.
I need your help to resolve this problem. Below is the code extract:

var sm = new Ext.selection.CheckboxModel({
listeners: {
beforerowselect: function (selModel, rowIndex, keepExisting, record) {
alert('before selection');

selectorGrid = Ext.create('Ext.grid.Panel', {
width: width,
height: height,
title: title,
store: store_grid1,
disableSelection: true,
loadMask: true,
columns: columns,
selModel: sm,
bbar: Ext.create('Ext.PagingToolbar', {
store: store_grid1,
displayInfo: true,
displayMsg: 'Displaying {0} - {1} of {2}',
emptyMsg: "No topics to display"
renderTo: 'selectorDiv'

31 Jan 2012, 1:27 AM
Have you tried removing this line?

disableSelection: true,

31 Jan 2012, 6:54 AM
@Skirtle- Thank you so much, it worked when I removed that line. :)