3
votes

I need to have a column in my Extjs grid with a checkbox which doesn't have a data field assigned to it. I have tried checkColumn plugin but it only works when I assign a data field to it.

What I mean is that it works for the following code:

{header: 'Business Call?',dataIndex: 'business', width: 55, xtype: 'checkcolumn'}

But for this code, it only displays a checkbox, but it's not clickable:

{header: 'Set Business Call', width: 55, xtype: 'checkcolumn'}

What I want to happen is, when the user ticks the checkbox, I need to do some operation on the respective database row. Is this possible with Extjs?

2

2 Answers

2
votes

What are you planning on doing with the clickable checkbox? If it's simply the act of clicking that you're trying to intercept, what is harmed by specifying a dataIndex?

1
votes

Remember that you should add the picture of checkbox to ur images from extjs-->resources-->images-->default-->grid

{
 xtype: 'checkcolumn',
 header: 'Capital City',
 dataIndex: 'CapitalCity',
 editor: {
          xtype: 'checkbox',
          cls: 'x-grid-checkheader-editor'
          }
}