Author Topic: Two lines for every row of json data?  (Read 2660 times)

khadden

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 4
    • View Profile
Two lines for every row of json data?
« on: July 21, 2015, 05:24:47 am »
Hi, I have a column (in my json data) that has a list of names, so the data is potentially long. I need to have that column show in a second line for each row of json data.

So let's say I'm showing 4 column. Columns 1 - 3 should be on one line, and column 4 should be on a second line and be the entire width of the grid (i.e. colspan=3).

LIke this:

EmployerFirstLast
Joe's plumbingFredSmith
Employees: John, Bill, George, Jimmy
Greg's AutoJohnJones
Employees: Sam, Phil, Tim
Jill's hair salonJaneDoe
Employees: Sally, Jan, Alfred, Susan, Margret

Any ideas?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Two lines for every row of json data?
« Reply #1 on: July 21, 2015, 07:30:11 pm »
It can be done with detailModel

In the detailModel.init callback you have access to the rowData with which you can fill the data for second row. And second row fills entire width of the grid.

Example: http://paramquery.com/pro/demos/detail

khadden

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Two lines for every row of json data?
« Reply #2 on: July 22, 2015, 12:22:30 am »
Thanks I saw that in the api docs, but I'm on 2.0.0 and it doesn't seem to be available. I'll try to buy an upgrade. And see if it works.