Results 1 to 4 of 4

Thread: Add one more state event for columns.

  1. #1
    Sencha Premium Member
    Join Date
    Apr 2013
    Posts
    55
    Vote Rating
    1
      0  

    Default Add one more state event for columns.

    I want to add one more state event for column name "setFixValue", which is similar to filter.
    All foreign key columns in grid, will fire this event.
    there will be a combobox, which will load all vaule. For example UserId, will show combobox with UserName, and one can select it and hit "set" button, and "setClick" will save this value in State.

    Everything is working fine, but how to add state event??

    NOTE: on button click, I have object of "Ext.grid.column.Column" only. I do not want to fireevent from Grid. But from Column.
    i.e very simillar way to "setSortState: function(state, skipClear, initial) {".

    Where to add stateEvent name "setFixValue"??

    Any idea.

    Thanks in advance.

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,062
    Answers
    3976
    Vote Rating
    1391
      0  

    Default

    So you want to use the stateEvents config on the Column? Should be able to set it in the columns array config in the grid.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2013
    Posts
    55
    Vote Rating
    1
      0  

    Default stateChange event should invoke.

    Yes.

    Please find my code below.

    Code:
    var provider = new Ext.state.Provider();
    provider.on( "statechange", me.setDatabaseState );

    These 2 lines are added to each grid page. It invoke {setDatabaseState} function on "columnResize", "columnShow", "columnHide", "sortChange" and save into database.

    Now I want to add one more state event called "setfixvalue".

    So when user click on "ok" button, i will fire event manually like below, and it shd invoke "stateChange" event


    me.fireEvent('setfixvalue', me, header);
    Please Help.

  4. #4
    Sencha Premium Member
    Join Date
    Apr 2013
    Posts
    55
    Vote Rating
    1
      0  

    Default Created new class, but does not working.

    Code:
    Ext.define('Ext.ux.grid.FilterHeaderColumnModel',{
            
        extend: 'Ext.grid.column.Column',
        
        alias: 'widget.fixvaluecolumn',
    
    // stateful: true,
    
        stateEvents : 'setfixvalue'
    
    });
    I also tried to set stateful : true, but that does not make any difference

    Note: i have used xtype: 'fixvaluecolumn' for each column config.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •