Author Topic: Error when collapsing nested grid, v. 2.2.0  (Read 10839 times)

dbadmin

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Error when collapsing nested grid, v. 2.2.0
« on: December 31, 2014, 02:25:10 am »
Hi,

I'm getting an error "uncaught exception: dataIndx NA" after collapsing nested grid (no error occurs when I  open it up).
It seems to only happen when there's more than 1 row in a nested grid.

I can't seem to find any difference from example code, so I was wondering if it may ring any bell and you have some suggestions?

Thanks!

dbadmin

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Re: Error when collapsing nested grid, v. 2.2.0
« Reply #1 on: January 08, 2015, 10:44:56 pm »
Any ideas?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Error when collapsing nested grid, v. 2.2.0
« Reply #2 on: January 15, 2015, 11:33:42 am »
check dataIndx and assign them correctly.

dbadmin

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Re: Error when collapsing nested grid, v. 2.2.0
« Reply #3 on: January 30, 2015, 03:49:12 am »
I did check all the data indexes, and they're all fine.

I believe the problem may be related to pager. If there's only one page of results (or if I don't have pageModel specified at all) and I open up first row, I'll get behavior described in
http://paramquery.com/forum/index.php?topic=980.msg4844#msg4844

Could  you direct me to an example with remote paging and only one page of results that works?
I couldn't find this scenario in demos section.

Thanks

dbadmin

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Re: Error when collapsing nested grid, v. 2.2.0
« Reply #4 on: February 03, 2015, 07:26:28 pm »
Hi,

Could you comment on this?
I have spent several days trying to figure this out and it still doesn't work.
If it's a known issue, please let me know.

Thanks.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Error when collapsing nested grid, v. 2.2.0
« Reply #5 on: February 03, 2015, 08:06:05 pm »
There is no known issue; it couldn't be reproduced so far.

The referenced post discusses about scrolling problem, user couldn't reproduce the "dataIndx NA" error in the jsfiddle.

Please share a jsfiddle of your implementation so that I may have a look.

dbadmin

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Re: Error when collapsing nested grid, v. 2.2.0
« Reply #6 on: February 03, 2015, 10:24:39 pm »
Hi,

Here's my code http://jsfiddle.net/890wakod/
Please see LoadGrid function.

I either get the dataIndx error when collapsing the detail grid, or no error but the detail grid is collapsed incorrectly.
I'm not 100% sure, but it looks like these behavior is happening when there's only 1 page of results (like 2 records are present in the main grid, for example)

Thanks
« Last Edit: February 03, 2015, 10:28:23 pm by dbadmin »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Error when collapsing nested grid, v. 2.2.0
« Reply #7 on: February 03, 2015, 10:31:46 pm »
jsfiddle is incomplete and not functioning.

Please complete the code in HTML pane and css pane.

Also don't forget to include external dependencies. Take this jsfiddle as a base http://jsfiddle.net/b6b710mz/9/ as it includes the dependencies.

dbadmin

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Re: Error when collapsing nested grid, v. 2.2.0
« Reply #8 on: February 03, 2015, 10:34:26 pm »
Could you confirm, which version of pq  grid is it using? is it the same as mine -- v 2.2.0 ?

Thanks!

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Error when collapsing nested grid, v. 2.2.0
« Reply #9 on: February 03, 2015, 10:48:49 pm »
That is the latest version 2.3.0

dbadmin

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Re: Error when collapsing nested grid, v. 2.2.0
« Reply #10 on: February 03, 2015, 10:52:03 pm »
Is there a pq grid link you can share for v 2.2.0 , so I can use it in my jsFiddle?

dbadmin

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Re: Error when collapsing nested grid, v. 2.2.0
« Reply #11 on: February 04, 2015, 12:20:35 am »
So I started to modify the fiddle you provided and I"m not able to get a collapsible column working. If I comment it out, grid loads. If it's not commented out, the main grid looks empty.
http://jsfiddle.net/b6b710mz/39/

Any suggestions?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Error when collapsing nested grid, v. 2.2.0
« Reply #12 on: February 04, 2015, 12:32:51 am »
detailModel is not part of dataModel (obj.dataModel ) but main object ( obj ).

dbadmin

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Re: Error when collapsing nested grid, v. 2.2.0
« Reply #13 on: February 04, 2015, 12:42:35 am »
I modified the code but it doesn't seem to help

http://jsfiddle.net/b6b710mz/42/
« Last Edit: February 04, 2015, 12:44:39 am by dbadmin »

dbadmin

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Re: Error when collapsing nested grid, v. 2.2.0
« Reply #14 on: February 04, 2015, 08:26:13 pm »
Anything else doesn't look correct to you?

I couldn't find a demo with local detail model, so not sure if I'm missing something.

Thanks!