Results 1 to 3 of 3

Thread: Clear Highlighted Grid Row (GXT 2.x)

  1. #1
    Sencha Premium User
    Join Date
    Jun 2011
    Posts
    76

    Default Clear Highlighted Grid Row (GXT 2.x)

    I want to remove the highlight from a grid row when a highlighted row is clicked a second time.

    I thought I could do it with the following code -

    grid.getSelectionModel().getSelectedItems().clear();
    grid.removeStyleName("x-grid3-highlightrow"); // or grid.removeStyleName("x-grid3-row-selected");

    but this doesn't work.

    Is there something I'm missing or some refresh I need to perform on the grid?

    Thanks.

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

    Default

    grid.getSelectionModel().getSelectedItems().clear();
    That does not really deselect the item. You need to call the deselect method on the selectionmodel in your click event listener (probably you need to defer the logic using the Scheduler)

  3. #3
    Sencha Premium User
    Join Date
    Jun 2011
    Posts
    76

    Default

    Thanks for that - I actually used deselectAll which does just what I need.

    Cheers

Posting Permissions

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