hi...
I think you can do this in 2 ways.
1) If You use sql server and use Stored Procedure then
Write query with Group by and rollup which return your required result.
2) You can create result set like
Fetch 2 Datatable one for Distict Date and One for Date with Detail
Datatable tmpdt=new Datatable();
for(i=0;i<dt.rows.count;i++)>
{
Decimal totAmt=0.0;
for(j=0;j<=dtDetail.rows.countj++)
{
if(dt.rows[i]["Date"]==dtDetail.rows[j]["Date"])
{
totAmt=totAmt+convert.toDecimal(dtDetail.rows[j]["Date"]);
}
}
Datarow dr;
dr=dttmp.NewRow();
tmpdt.rows.add(dr);
}
// Finally set data source to grid