jQWidgets Forums

jQuery UI Widgets Forums Grid select entire row via click

This topic contains 2 replies, has 2 voices, and was last updated by  ulao 12 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • select entire row via click #16550

    ulao
    Member

    So I need some common spread sheet events added here. Like selecting rows, columns, and the entire sheet. The only way I see this possible is to use events and then make the selections. I would need to get access the to outer cells. For example this would be one way.

    $(“#jqxgrid”).on(“rowclick”, function (event) {
    var args = event.args;
    var row = args.rowindex;
    if (args.column == //null or -1 ? )
    $(‘#jqxgrid’).jqxGrid(‘selectrow’, args.rowindex);
    });

    problem here is I can’t get access the the column? args.column is undefined. I dont want the row to get selected merely by clicking anywhere on the row, only the cell header click should do this. Also $(‘#jqxgrid’).jqxGrid(‘selectrow’, args.rowindex); does not seem to work, did I use that wrong?

    also I get for events fired per one click, is it firing one for each row?

    I just did a each on the events.args and there is a lot of data here not exposed like rightclick(bool) for example. How is one to learn about this if its not in the documentation?

     

    select entire row via click #16559

    Peter Stoev
    Keymaster

    Hi ulao,

    The rows selection is the default selection mode so you do not have to set the “selectionmode” property when you initialize the Grid.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    select entire row via click #16564

    ulao
    Member

    No that is no good, please reread. I need to find a way to click a “header” not a row. So take this for example

    0abcd
    1xxxx
    2xxxx
    3xxxx

    I need to be able to click on C and all x’s under C will be selected, also clicking 0 will select all x’s, and lastly clicking 1 will select all x’s in that row. I also need the multi drag and select. “multiplecellsadvanced” mode. So, since I can not have more then one mode I need to invent this.

    See above for my way of achieving this. It works but I need more data. When clicking on the row header the event is fired. However clicking on any item in that row also fires and that is no good. So I need to check what column i’m on to do this. Unless you can think of another way.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.