1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    53
    Vote Rating
    0
    evs.saad is on a distinguished road

      0  

    Default Show hide a label field dynamically

    Show hide a label field dynamically


    Hi,
    I have a grid. In this grid user can select the search criteria and filter according to it's requirement. I want to display a label in a row whenever a search field is selected, something like this your search criteria is :'abcd'
    whenever search button is clicked.The label should be displayed in a row. Can anyone help or can I get a demo example. Thanks in advance.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,872
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Is not sure I understand where you want to display this label .. you say in a row?
    Do you want to insert a row at the top of the grid .. how about a label in a toolbar that displays the current search criteria. If this does not help, perhaps a quick pic of what you are looking for.

    Scott.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    53
    Vote Rating
    0
    evs.saad is on a distinguished road

      0  

    Default


    Yes, I can show the search criteria in a toolbar. Do you have any demo of how to display data in a toolbar. Thanks for your reply.

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,872
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Please review the following:

    Code:
    var tb = Ext.create('Ext.toolbar.Toolbar', {
        renderTo: document.body,
        width   : 400,
        items: [
            {
                text: 'label',
              itemId: 'my-label'
            },
            {
                xtype: 'splitbutton',
                text : 'Split Button'
            }
        ]
    });
    
    // change label
    var label = tb.down('#my-label');
    label.setText('New Label');
    
    // hide label
    setTimeout(function(){
      label.hide();
    },1000);
    Scott.

Thread Participants: 1