tonytomov / jqGrid

jQuery grid plugin
www.trirand.com
2.85k stars 1.2k forks source link

Wrong tr id in treegrid adjacency #666

Open flack opened 9 years ago

flack commented 9 years ago

In 4.6, when I had an index column like this:

{name:'id',index:'id', hidden: true, key: true }

Then the treegrid would render the tr tag with the id taken from my data, e.g.

<tr id="326" class="ui-widget-content jqgrow ui-row-ltr" tabindex="0" role="row">
<tr id="314" class="ui-widget-content jqgrow ui-row-ltr" tabindex="-1" role="row">

in 4.7.0, it simply uses a counter to generate its own ids:

<tr id="1" class="ui-widget-content jqgrow ui-row-ltr" tabindex="0" role="row">
<tr id="2" class="ui-widget-content jqgrow ui-row-ltr" tabindex="-1" role="row">

The problem with that is that the tr id is passed as nodeid in the POST request to the backend when you try to expand the node. And since it's the wrong ID, nothing will be found.

The other grids I'm using (non-treegrid ones) still have the correct tr id, so this seems to be a treegrid-specific regression

tonytomov commented 9 years ago

Hello, Can you please post a example?

Thank you

flack commented 9 years ago

@tonytomov You can see it in the jqGrid demo page:

http://trirand.com/blog/jqgrid/jqgrid.html

go to "New in version 3.4" > "Tree Grid Adjacency mode". If you click on "Bank's", it will return "Sub Cash 1" as child, if you click on "Cash", nothing happens at all.

tonytomov commented 9 years ago

Hello, The demo here is not updated to the new 4.7 one. I always recommend a code, since I can see every detail which in all cases is important

flack commented 9 years ago

@tonytomov I've made a demo available here:

http://demo.openpsa2.org/documents/

When you click on the folder expanders, most of the XML requests will return 404s, because of the invalid nodeid values passed. Some will return items, but always the wrong ones

kkrasnik commented 9 years ago

I report same behavior after upgrading to 4.7.1

flack commented 9 years ago

@kkrasnik: Since Tony's project is no longer usable for commercial work (due to the licence change), we have fixed this now in

tonytomov commented 9 years ago

@flack : Please, I do not comment that you use open source and this is not serious. I think this should stop. If you want to have popularity there are other way to do this.

flack commented 9 years ago

@tonytomov I have no intention of starting a fight with you. I just received @kkrasnik's comment as an email and replied to it. I'm not actively watching your repo anymore, so don't worry, I won't spam your issue tracker or anything.

But for the record: I still think that you did not have the right to change the licence without getting consent from all copyright holders. That is why I might sound less than friendly at times. But don't worry, it is nothing personal, I actually have a life outside of jqGrid :-)

bouks commented 9 years ago

@tonytomov It's a false trial to tell that @flack is dragging your users, you should notice that he opened this issue first and you didn't care about it since 2014-12-10... So i think he does the only possible helping to @kkrasnik who is blocked by this bug.

kkrasnik commented 9 years ago

Thank you for help. Thank you for your hard work.

tonytomov commented 9 years ago

@flack

But don't worry, it is nothing personal, I actually have a life outside of jqGrid :-)

Sure