jQuery UI Widgets Forums Grid JqxGrid args.level

This topic contains 5 replies, has 2 voices, and was last updated by  Stanislav 6 years, 9 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • JqxGrid args.level #99014

    nickjb
    Participant

    Hi,

    I’m trying to get the level of a row in the groupexpand. I don’t know why but i always receive the level 0 for each row that i click. Is it normal?

    JqxGrid args.level #99028

    Stanislav
    Participant

    Hello nickjb,

    Here is an example of args.level that goes deeper than ‘0’: Fiddle

    The reason is that it gets the level that the clicked group is on. In the example, if you click on any of the rows, it will return ‘0’, because it is on the first level. The level two rows ‘1’ are located on the level ‘0’ grouped rows.

    Demonstration:
    1) Click on the first row(expand it)
    2) In the console.log(it should tell you the ‘args’ and ‘level’), the level should show ‘0’
    3) Click on the first row, from the expanded group first layer row.
    4) Now in the console, it should show you the ‘args’ again, but for the level, it should say ‘1’ instead of ‘0’.

    This is what args.level gives, how deep the clicked row is inside the grid.

    Best Regards,
    Stanislav

    jQWidgets Team
    http://www.jqwidgets.com/

    JqxGrid args.level #99034

    nickjb
    Participant

    hello Stanislav,

    When I’m going to the Fiddle, I see the level 0 when I try to expand the first group.
    When I try to click on the first row in the expanded group, I don’t see the level in the console.log.

    Is it normal?

    Best Regards.

    JqxGrid args.level #99043

    Stanislav
    Participant

    Hello nickjb,

    I am sorry, I made a mistake.
    I forgot to tell that you will have to group, let’s say by FirstName(which is by default) and by LastName.

    Here is the updated example: Example
    When you click on the second row the console will show you the second level group.

    Best Regards,
    Stanislav

    jQWidgets Team
    http://www.jqwidgets.com/

    JqxGrid args.level #99050

    nickjb
    Participant

    Hi Stanislav,

    When I click on the third group of the first group, the level is still 1 and it’s not 2.
    It should be my index, starting to 0 and go on, but it stays at 1.

    Is it normal?

    Thanks

    JqxGrid args.level #99077

    Stanislav
    Participant

    Hello nickjb,

    Here is an example of how the levels work in jqxGrid: Link

    When you open your console, you will see what the console.log() outputs.
    1)The first element is the args, it gives you information for the grouped row.
    2)The second element level: "index" is the level you have clicked. Take note that I added even more depth to the grid this time to have more levels!
    In the previous example groups: ['firstname', 'lastname', 'productname'], had only two elements inside!

    When you click on a row that is not grouped(that is at the end of the group, the bottom level) it will not give you a level index because it is a grid row!

    Best Regards,
    Stanislav

    jQWidgets Team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.