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.
 
Try reading some about stackpanels, they might be what you are looking for :wink:
 
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.
 
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.
 
Thanks a lot Catholic Tech Geek, that sounds like what I looked for.
Thanks again.:smile:
 

Members online

No members online now.

Forum statistics

Threads
339,398
Messages
2,262,419
Members
428,755
Latest member
Big.blakdog