Author Topic: Can't expand a second tree branch when using remote data  (Read 3596 times)

jjestrellaa

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 15
    • View Profile
Can't expand a second tree branch when using remote data
« on: July 09, 2019, 08:47:31 pm »
I can't expand a tree branch after expanding one already. Getting error "duplicate id".

The default data has 3 branches and the first query is the 4th and final branch. I can get the data on the first expansion of the 3rd branch, but if i try to expand another 3rd branch i get the error.

See attachments

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Can't expand a second tree branch when using remote data
« Reply #1 on: July 09, 2019, 09:30:47 pm »
Treegrid is supposed to have one column with unique values.

Error is thrown when the values are not unique in that column.

Please see treeModel.id

https://paramquery.com/pro/api#option-treeModel

jjestrellaa

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Can't expand a second tree branch when using remote data
« Reply #2 on: July 09, 2019, 11:48:48 pm »
Same data and it works on PQGrid 4. Doesn't work on PQGrid 6

Treegrid is supposed to have one column with unique values.

Error is thrown when the values are not unique in that column.

Please see treeModel.id

https://paramquery.com/pro/api#option-treeModel

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Can't expand a second tree branch when using remote data
« Reply #3 on: July 10, 2019, 10:03:51 am »
There is no check for duplicate ids in v4

jjestrellaa

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Can't expand a second tree branch when using remote data
« Reply #4 on: July 10, 2019, 11:30:09 pm »
I have Id column and the values are unique. That's the value i'm passing on the sql query.

It's on the second request where things fail.

There is no check for duplicate ids in v4

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Can't expand a second tree branch when using remote data
« Reply #5 on: July 10, 2019, 11:38:25 pm »
Could you please share a jsfiddle so that I can check it.

jjestrellaa

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Can't expand a second tree branch when using remote data
« Reply #6 on: July 11, 2019, 12:29:26 am »
....Yep I see the issue.

Data is returning the same Id for the next results

we can close this.