How do I do this?

Hi everyone,

I just stared using yii and have an application with 3 models, Member, Deposits and Withdrawals. I want to view the member’s detailed transactions i.e both deposits and withdrawals in a CGrideView with the following columns, transaction type (either withdrawal or deposit), transaction no( the deposit or withdrawal id), date and finally amount.

How do I go about doing this?

I already have the relations setup, so this is more on how to pass the member’s deposits and withdrawals to the grid view for it to display them.

Thanks.

Hi,

if you use CGridView for example to display your data you simple have to pass the dataprovider to then second data parameter of the render Method.

Look through the Blog Tutorial for code examples or use forum search with keyword e.g. gridview