1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    17
    Vote Rating
    0
    biot023 is on a distinguished road

      0  

    Default Have a different custom r-click menu for each grid's header?

    Have a different custom r-click menu for each grid's header?


    Hallo -- is it possible to create a grid, but to override the default menu that appears when you right-click the header?
    I need to be able to have a menu on each header that would have the following options:
    * Sort ASC
    * Sort DESC
    * Filter on none
    * Filter on Amanda
    * Filter on Beatrice
    * Filter on Claire
    * etc...

    The sort options would be fairly standard (except I'd have to intercept & implement them myself, I guess), but the filter options would be generated from all the contents of the column, with one option for each (unique) entry.
    This is basically what Excel offers when you click on the headers to filter information.
    Is this at all possible?
    Cheers,
    Doug.

    PS -- love Ext so far (only been looking at it 2 days)!
    PPS -- sorry if this is the wrong forum for a question like this -- I saw others had posted here, so did too. The "He Started It" defence...

    NOTE -- I'd meant to post this here yesterday, but think I may have posted elsewhere. Couldn't find it today & still haven't found an answer, so I've reposted!

  2. #2
    Sencha Premium Member
    Join Date
    Jun 2007
    Location
    Ostrava, Czech Republic
    Posts
    43
    Vote Rating
    2
    ostghost is on a distinguished road

      0  

    Default don

    don


    try to use
    Code:
    grid.on('headerclick', columnClicked);
    var columnClicked = function(e) {
    		// Ext.get(e.target).highlight();
    		
    		// var paragraph = Ext.get(e.target);
    		// paragraph.highlight();
     		// alert(e.id);
     		
    		Ext.MessageBox.show({
    			title: 'Paragraph Clicked',
    			msg: grid.getColumnModel().getColumnId(2),
    			width:400,
    			buttons: Ext.MessageBox.OK
    		});
    		
    	}
    not the best solution but works or will for same problem on my side - need to have advanced filters on each columns like select boxes between note between etc and put it in standard grid menu is impossible

    better solution? so post it :-)

  3. #3
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

    Default


    take a look at the headercontextmenu event for the grid header, or explore overriding the Ext.grid.GridView's handleHdCtx method.

  4. #4
    Ext User
    Join Date
    Jul 2007
    Posts
    17
    Vote Rating
    0
    biot023 is on a distinguished road

      0  

    Default


    Cheers for those -- I'll be looking into both!

  5. #5
    Ext User
    Join Date
    Jul 2007
    Posts
    17
    Vote Rating
    0
    biot023 is on a distinguished road

      0  

    Default


    Quote Originally Posted by mystix View Post
    take a look at the headercontextmenu event for the grid header, or explore overriding the Ext.grid.GridView's handleHdCtx method.
    Cheers for those pointers -- I'm currently reading through the code to see if I can figure it out, but I'm not really even remotely a js guru.
    Not that that's gonna stop me trying...
    But would you be able to give me any other pointers at all?
    & cheers again,
    Doug.

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi