• Welcome to the all-new Windows Central Forums! - We're still moving some things around, so you may see a few quirks here and there, but we're working on getting things fully completed as soon as possible. For now, take a look around, and if you run into any major issues, please let us know in this thread!

GridData in windowsphone 8

quanlich

New member
Sep 11, 2012
41
0
0
Hello,I want to design an app to track expenses. I have a problem with display all transactions in one day. I want to do something like this:
May 25 $68.00
--------------------------------------------------------------
Food $25.00
Gift $25.00
Telephone $18.00

May 24 $43.00
--------------------------------------------------------------
Food $20.00
Hobbies $23.00

The problem is that I can only display each transaction on its own date (ex. Food $25 May 25). I don't know how to group all transactions in the same date.Does anyone have suggestion?

Thanks in advance.
 

DBDev

New member
Jan 13, 2012
2,380
0
0
Try reading some about stackpanels, they might be what you are looking for :wink:
 

quanlich

New member
Sep 11, 2012
41
0
0
Thank DBDev for replying.
I think I didn't explain clearly enough.
I have a class Transaction.cs which has properties (date, category, amount). I used ListBox (like griddata) to display all transactions in form of table.
As I mentionned in the first post, I can only display a single transaction like:
Food $20.00 May 24
Hobbies $23.00 May 24

So, I want to display all transactions in one date as I mentionned in the first post like this:

May 24
Food $20.00
Hobbies $23.00

Thanks.
 

Catholic Tech Geek

New member
Feb 2, 2012
130
0
0
You could take advantage of the grouping capabilities of the LongListSelector control. The code for implementing grouping differs between Windows Phone 7 and Windows Phone 8. Either way, the process is basically the same: you have one big datastore and you first have to separate out everything into groups (choose a "primary key", in this case, the date), easily done by using LINQ (you need to make a "group" class though), and then you add the collection of groups as the ItemSource of the LongListSelector.
 

quanlich

New member
Sep 11, 2012
41
0
0
Thanks a lot Catholic Tech Geek, that sounds like what I looked for.
Thanks again.:smile: