ManJan
ManJan

Reputation: 3991

EXTJS Change default behaviour of the GridPanel row selection

I have a gridPanel based on EXT4. When I select a particular row, the row highlighting works based on the "id" given to the particular row. How do I change the default implementation to something to use like "rowId" instead of "id" Where is this done? How do I make the change?

Upvotes: 2

Views: 310

Answers (1)

Sunish
Sunish

Reputation: 106

The idProperty is the config option in Ext.data.Model which defaults to 'id'. You can change it to 'rowid' in your Model. If you are specifying fields directly in your Store, you will have to define a Data Model to have this option.

References:

http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.data.Model-cfg-idProperty http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.data.Store-cfg-fields

Upvotes: 1

Related Questions