Results 1 to 4 of 4

Thread: grid Cell Click

  1. #1
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747

    Default grid Cell Click

    Hey Jack,

    Is there any way to not only detect a cell click (the 'cellclick' event), but also cancel the select of that row if SingleSelectionModel is being used?

    Thanks!

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956

    Default

    Can you explain a little further what you want to do?

  3. #3
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747

    Default

    Click on an image within a cell but not necessarily select that row.

    Can this be done w/ a managed listener on the image and a call to stopPropagation?

    Note: Just tried it and it works great. This column data is all just an image, so I used a column renderer to render the image:

    Code:
    favRenderer : function(f) {
                var html = '<img image='' image='star_on.gif' image='star_off.gif'>';
            }
    And as you see there, since there is an image per row and I need to have them all listen to clicks and mouse over/up's, I manually subscribed them...and the starClick just takes argument e and does a EventObject.setEvent(e) + e.stopPropagation().

    There isn't an easier or smoother way that you know of, is there? Plus, I still want to know which row was clicked :-) Thanks.

  4. #4
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747

    Default

    I just did a quick and dirty solution. I noticed the span elements are all decorated with meta tag (thanks!!!!!!), so I go to the parent node of the containing row of the image and grabbed the rowIndex property. Solved.

    Thanks, and let me know if you're thinking an easier way :-D

Similar Threads

  1. How to activate a cell editor based on another cell?
    By kimu in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 21 May 2008, 11:01 AM
  2. paging grid: when click on a row.........
    By hunter in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 6 Mar 2007, 5:38 AM
  3. Right click menu on grid
    By fractal in forum Ext 1.x: Help & Discussion
    Replies: 7
    Last Post: 30 Jan 2007, 6:47 AM
  4. Mouse click and ctrl + mouse click on grid row
    By bidyut in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 14 Dec 2006, 2:13 PM

Posting Permissions

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