jQWidgets Forums

jQuery UI Widgets Forums Getting Started Jqxgrid Row Details expand and collapse

This topic contains 3 replies, has 3 voices, and was last updated by  ei7024 10 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • ksheer
    Participant

    Hi Jqwidgets team,

    I am facing a small issue in the jqxgrid row details. I want to collapse the previous expanded row.
    for example I expanded row no 1. now I click to expand row no 2. I want row no 1 to collapse automatically.

    Thanks for your help.

    Ksheer


    Peter Stoev
    Keymaster

    Hi Ksheer,

    The hiderowdetails method can be used for collapsing a row. The parameter which you have to pass is the row’s data bound index(not the visible index). Ex: http://jsfiddle.net/jqwidgets/pyGV6/

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    ei7024
    Participant

    Hi Peter,

    I was going to create a similar thread but though on continuing this as it may also prove beneficial to the OP. Now to the main reason, I am not sure if there was an error in the way I designed the function or not but I have come across an issue and not sure how to rectify it. The issue occurs only when a filter of some sort has been applied! I have modified the previous code here. If you apply a filter to the first name, I tried ‘an’, you will observe that the first 3 records may collapse fine but the last record will not! But if the filters are cleared there will be no issue.

    The only thing i noticed was the (selectedrowindexes: [event.args.rowindex]) does not select the row that are visible.

    Any input will be appreciated!

    Thanks,


    ei7024
    Participant

    Okay I managed to fix it…It now work as i intended it to the same principle as the OP had in mind. You can find the code here. It commented at the last few lines

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

You must be logged in to reply to this topic.