Multiple lines per row but search as one

Multiple lines per row but search as one

bazianmbazianm Posts: 6Questions: 4Answers: 0

Hi,

I have a situation where I need to show two or more rows as a unit of data. For example, I might want to show two products that can go together to make a unit. Suppose I was looking for things that could be made into a sandwich. My results might show:

 FoodCaloriesPrice
1.Bread2000.25
 Peanut Butter1500.10
 
2.Bread2000.25
 Peanut Butter1500.10
 Jelly750.10
 
3.Bread2000.25
 Roast Beef2501.00
 

OK, here's the challenge. I need to be able to filter and sort them by:

a) All combinations containing an ingredient.

b) Total calories.

c) Total cost.

I was thinking that I could use a nested table for this with some hidden columns that have the totals and other information (like a comma delimited list of the descriptions) and filter/sort on those. I was planning on using YADCF for the sorting.

Any ideas if this is feasible? If my approach is wrong, is there another way to accomplish this with datatables and something like YADCF?

Thanks

This discussion has been closed.