Pravin.Pawar
30 Aug 2012, 6:09 AM
Hi,
I'm using following code to make cell clickable.
var scriptDetailsGrid = Ext.create('Ext.grid.Panel', {
id: 'scriptDetailGrid',
store: store,
header: false,
border: false,
emptyText: 'Script details unavailable.',
simpleSelect: false,
columns: [
{
text: "Description",
dataIndex: 'Description',
locked: true,
width: 450,
sortable: false
},
{
text: "Name",
dataIndex: 'Name',
width: 150,
sortable: true
},
{
text: "Address",
dataIndex: 'Address',
width: 150,
sortable: true
}
],
listeners: {
cellclick: function (grid, td, cellIndex, record, tr, rowIndex, e, eOpts) {
debugger
if (record.data.key == 'Description') {
Ext.Msg.alert('Description', record.data.value);
}
}
},
layout: 'fit',
region: 'center',
title: 'Script Details'
});
In the above code; I have freezed first column which is stoping cellclick event of the grid. Please let me know if there is any alternative way so that I can freeze column as well as make the cell item clickable.
Thanks, Pravin
I'm using following code to make cell clickable.
var scriptDetailsGrid = Ext.create('Ext.grid.Panel', {
id: 'scriptDetailGrid',
store: store,
header: false,
border: false,
emptyText: 'Script details unavailable.',
simpleSelect: false,
columns: [
{
text: "Description",
dataIndex: 'Description',
locked: true,
width: 450,
sortable: false
},
{
text: "Name",
dataIndex: 'Name',
width: 150,
sortable: true
},
{
text: "Address",
dataIndex: 'Address',
width: 150,
sortable: true
}
],
listeners: {
cellclick: function (grid, td, cellIndex, record, tr, rowIndex, e, eOpts) {
debugger
if (record.data.key == 'Description') {
Ext.Msg.alert('Description', record.data.value);
}
}
},
layout: 'fit',
region: 'center',
title: 'Script Details'
});
In the above code; I have freezed first column which is stoping cellclick event of the grid. Please let me know if there is any alternative way so that I can freeze column as well as make the cell item clickable.
Thanks, Pravin