group by filter on gridview

Dear all,

I have a GridView that shows projects and their stages status. Below are the table definitions.

project


id

project_name

description

status


id

name

default_duration

description

stage


id

projectFk # FK to project(id)

statusFk # FK to status(id)

startDate # Starting date of this status

deadline # Deadline date for this status

endDate # Finish date of this status, if null it means not finish yet

person_in_charge

memo

The model used in the GridView is stage and in this GridView there are many projects and each project can have more than one status. I need a kind of switch so that user can see either all projects and their statuses (where I can set the filter to a projects and see their statuses since this GridView shows a same project in many rows), or shows a distinct project with latest status (this is more to group by projectFk).

Is that possible to do so? Any hints or guidance on implement this?

TIA

Daniel