1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    4
    Vote Rating
    0
    Kenzo59 is on a distinguished road

      0  

    Default Unanswered: How can I change the style of items selected

    Unanswered: How can I change the style of items selected


    Hi,
    I have a itemselector (xtype : 'itemselector'), and I would like to change style of selected items.Code :
    {

    anchor: '100%',
    xtype: 'itemselector',
    name: 'hosts',
    id: 'hosts-field',
    fieldLabel: 'Host name',
    imagePath: '../ux/images/',
    store: hostStore,
    displayField: 'strHostName',
    valueField: 'strHostName',
    triggerAction : 'query',
    allowBlank: false,
    buttons: ['add', 'remove'],
    height: 200,
    renderTpl: [

    // body row. If a heighted Field (eg TextArea, HtmlEditor, this must greedily consume height.
    '<tr id="{id}-inputRow" <tpl if="inFormLayout">id="{id}"</tpl>>',

    // Label cell
    '<tpl if="labelOnLeft">',
    '<td id="{id}-labelCell" style="{labelCellStyle}" {labelCellAttrs}>',
    '{beforeLabelTpl}',
    '<label id="{id}-labelEl" {labelAttrTpl}<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"',
    '<tpl if="labelStyle"> style="{labelStyle}"</tpl>>',
    '{beforeLabelTextTpl}',
    '<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',
    '{afterLabelTextTpl}',
    '</label>',
    '{afterLabelTpl}',
    '</td>',
    '</tpl>',

    // Body of the input. That will be an input element, or, from a TriggerField, a table containing an input cell and trigger cell(s)
    '<td class="{baseBodyCls} {fieldBodyCls}" colspan="{bodyColspan}" role="presentation">',
    '{beforeBodyEl}',

    // Label just sits on top of the input field if labelAlign === 'top'
    '<tpl if="labelAlign==\'top\'">',
    '{beforeLabelTpl}',
    '<div id="{id}-labelCell" style="{labelCellStyle}">',
    '<label id="{id}-labelEl" {labelAttrTpl}<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"',
    '<tpl if="labelStyle"> style="{labelStyle}"</tpl>>',
    '{beforeLabelTextTpl}',
    '<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',
    '{afterLabelTextTpl}',
    '</label>',
    '</div>',
    '<div id="{id}-bodyEl">',
    '</div>',
    '{afterLabelTpl}',
    '</tpl>',

    '{beforeSubTpl}',
    '{[values.$comp.getSubTplMarkup()]}',
    '{afterSubTpl}',

    // Final TD. It's a side error element unless there's a floating external one
    '<tpl if="msgTarget===\'side\'">',
    '{afterBodyEl}',
    '</td>',
    '<td id="{id}-sideErrorCell" vAlign="{[values.labelAlign===\'top\' && !values.hideLabel ? \'bottom\' : \'middle\']}" style="{[values.autoFitErrors ? \'display:none\' : \'\']}" width="{errorIconWidth}">',
    '<div id="{id}-errorEl" class="{errorMsgCls}" style="display:none;width:{errorIconWidth}px"></div>',
    '</td>',
    '<tpl elseif="msgTarget==\'under\'">',
    '<div id="{id}-errorEl" class="{errorMsgClass}" colspan="2" style="display:none"></div>',
    '{afterBodyEl}',
    '</td>',
    '</tpl>',

    '</tr>',
    {
    disableFormats: true
    }
    ]


    Regards,
    New user of ExtJs

  2. #2
    Sencha User
    Join Date
    Oct 2012
    Posts
    4
    Vote Rating
    0
    Kenzo59 is on a distinguished road

      0  

    Default Help

    Help


    Please anyone can help me ?

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    4
    Vote Rating
    0
    Kenzo59 is on a distinguished road

      0  

    Default PLEASE

    PLEASE


    It's urgent please. Anybody can help me...

  4. #4
    Sencha User metalinspired's Avatar
    Join Date
    Apr 2012
    Posts
    98
    Answers
    4
    Vote Rating
    4
    metalinspired is on a distinguished road

      0  

    Default


    first wrap your code into
    HTML Code:
    [CODE][/CODE]
    trying to read your code posted in its current way hurts people eyes

Thread Participants: 1

Tags for this Thread