Home All Groups Group Topic Archive Search About
Author
29 Nov 2006 4:02 PM
si_owen
Hi all,

I have a datagrid receiving results from a database with several
records for specific date, what i want to do is add a line or blank row
under the last record for that date and before the records for the next
date begin.

does anyone know the code to implement this???

any help will be much appreceiated,

Cheers

Simon

Author
29 Nov 2006 4:07 PM
lord.zoltar
si_owen wrote:
Show quoteHide quote
> Hi all,
>
> I have a datagrid receiving results from a database with several
> records for specific date, what i want to do is add a line or blank row
> under the last record for that date and before the records for the next
> date begin.
>
> does anyone know the code to implement this???
>
> any help will be much appreceiated,
>
> Cheers
>
> Simon

Probably a few ways to do it...
One way would be to manually go through the result set that comes back
from the database and add each row to the datagridview. You'd have to
look ahead to the next row, and if the next row has a different date
than the current one, you could just add an exta blank row. This
assumes that your data comes back ordered by date...
Author
4 Dec 2006 10:27 AM
si_owen
exactly the way i was planning to do it was just after a possible line
of code that woukld add the blank line to gridview, or put a coloured
line between the records for the two different dates already have the
code to check for the different dates.