jQuery UI Widgets › Forums › Grid › JqxGrid args.level
Tagged: groupexpand, jqxGrid ;, level
This topic contains 5 replies, has 2 voices, and was last updated by Stanislav 6 years, 9 months ago.
-
AuthorJqxGrid args.level Posts
-
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?
Hello nickjb,
Here is an example of
args.level
that goes deeper than ‘0’: FiddleThe 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,
StanislavjQWidgets Team
http://www.jqwidgets.com/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.
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,
StanislavjQWidgets Team
http://www.jqwidgets.com/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
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 theargs
, it gives you information for the grouped row.
2)The second elementlevel: "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 examplegroups: ['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,
StanislavjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.