javascript - Default value in grid -


i have grid/list:

items: [                     {                         xtype: 'gridpanel',                         reference: 'list',                         resizable: false,                         width: 200,                         title: '',                         forcefit: true,                         bind: {                             store: '{schedules}'                         },                         columns: [                             {                                 xtype: 'gridcolumn',                                 dataindex: 'revision',                                 text: 'revision'                             }                         ], 

i want add listener record @ index 0 in store selected default.

i've tried playing selmodel not working intended.

do on viewready event:

{     xtype: 'gridpanel',     listeners: {         'viewready': function(g) {             g.getselectionmodel().select(0);         }     },     // .... } 

example: https://fiddle.sencha.com/#fiddle/qe6


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -