Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Grid row selection doesn't respond

  1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    40

    Question Grid row selection doesn't respond

    Hi Sven,

    I am trying to catch a row selection event in my grid, but the selection event doesn't occur. This grid is located in a Popup.
    I tried to add a addRowDoubleClickHandler, but in the handler, when I check grid's selection model, there is no selected item. Please note that in all the other grids it works fine, just in this grid I have that problem, and I can't figure it out.
    Do you have any ideas what can be the problem?

    Thank you,

    Alon

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    To understand it correctly, you do not even see the blue selection mark in the grid UI, or just the event is missing?


    Could you please share a testcase implementing EntryPoint that exactly shows your setup, especially the Popup part is important.

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    40

    Default

    Hi,

    I don't even see the blue mark on the selected row in the grid.
    I can create a test case, but I don't think it will help because I have another grid in a popup, and it works fine, I guess I am just missing something in the current grid's model, or the grid's configuration, I just can't figure what exactly is the problem.

    Thank you,

    Alon

  4. #4
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    Normally this should work out of the box. Is it possible that there is an exception somehow?

    I think the best is to open a real support ticket to schedule a remote desktop session, so this can be debugged locally at your side and directly with the problem

  5. #5
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    40

    Default

    I just tried to switch to another model and it works great, so as I suspected the problem is with my model, I thought it might be the model's id but it looks fine.

    Our network is closed for connection from outside, thank you for the help, I guess I will create the model from scratch and hope it will help.

    Thanks,

    Alon

  6. #6
    Sencha Premium Member
    Join Date
    Nov 2012
    Location
    Cremona Italy
    Posts
    37

    Default

    I had a similar issue (I could not select another row after selecting one) and the problem turned to be the PropertyAccess' ModelKeyProvider you need to pass to the listStore constructor: it was always "null" by mistake.

    Hope it can help.
    Regards

  7. #7
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    40

    Default

    Thank you for the response, I had the same issue too once, so it was the first thing I checked.
    I found the problem, in my grid I have TextAreaInputCell which takes almost the whole size of the grid, and when I am clicking on this cell there is no selection event, but when I am clicking on one of the other cells in the row the selection event occurs. I noticed that in the demo of Cell Grid there is the same problem, not all the cells in the grid respond to the row selection.
    Any suggestion how I can fix it?

    Thanks,

    Alon

  8. #8
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    If that is the problem, than you will need to create a custom grid appearance. The cell and row selector depth needs to be increased.

  9. #9
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    40

    Default

    I already have a custom grid appearance, what do you mean "cell and row selector depth"? the z-index of the cell and row class in the grid.css?

  10. #10
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    I mean those two methods in GridBaseAppearance:
    Code:
    @Override  public Element findRow(Element elem) {
        if (Element.is(elem)) {
          return elem.<XElement> cast().findParentElement("." + style.row(), 15);
        }
        return null;
      }
     @Override
      public Element findCell(Element elem) {
        if (Element.is(elem)) {
          return elem.<XElement> cast().findParentElement("." + style.cell(), 15);
        }
        return null;
      }
    Try to increase 15 to 25 for example.

Page 1 of 2 12 LastLast

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
  •