Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qplace #38

Closed
artinact opened this issue Jun 4, 2015 · 1 comment
Closed

qplace #38

artinact opened this issue Jun 4, 2015 · 1 comment

Comments

@artinact
Copy link

artinact commented Jun 4, 2015

Couple of questions:

  1. rowClick: how to call default event after processing the code in rowClick?
  2. how to find selected row? I have a "select" button outside of grid. Upon clicking on it I want to know which row in the grid is currently selected.

Thanks,

@tabalinas
Copy link
Owner

  1. What default rowClick does is just call editItem method if editing is true. So you can do the following:
rowClick: function(args) {
    // your actions
    this.editItem(args.item);
}
  1. Option selecting is actually means row highlight on mouse hover.
    If you wish to select row e.g. on row click, you can save selected row in external variable:
rowClick: function(args) {
    // save selected item
    selectedItem = args.item;

    // save selected row
    $selectedRow = $(args.event.target).closest("tr");

    // add class to highlight row
    $selectedRow.addClass("selected-row");
}

and styles for selected row

    .selected-row > td {
        background: #c4e2ff;
        border-color: #c4e2ff;
    }

Hope it will help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants