Can DataGridView be setup to bind to just one record across multiple rows?

I have a table that has records that contains groups of date fields (maybe 20 groups of 3 date fields):

example schema:

LocationID

Job#

Task1Date1

Task1Date2

Task1Date3

Task2Date1

Task2Date2

Task2Date3 .... and so on for up to 20 Tasks of 3 dates apiece

Can I setup a bound DateGridView to show 20(n) rows (based on the 20 groups of tasks on one record) by 3 columns of dates (based on the Task(n)Date1, Task(n)Date2 and Task(n)Date3 fields on the one record) but for just one record at a time

So the grid looks like a 20 row by 3 column, but it is really just one whole record it is showing and not 20 records (which would be the natural behavior of the grid). Then there would be a NEXT navigation button (at the bottom of the form) to take you to the next record.

I had thought about breaking up the record into multiple records of just the one task with 3 dates. But that schema change would cause me to change a lot of other tables, queries and how I generally already have things working.

If I can't set up the DataGridView control as bound, is it possible to somehow position (at run time) a textbox in the cell of a grid and have the textbox bound to the dates and then have the textbox travel inside the cell if the user does sorting or moving the columns around on the grid

Thanks for any advice or insight into this,

Ted Miller

tedmiller@tampabay.rr.com



Answer this question

Can DataGridView be setup to bind to just one record across multiple rows?

  • Can DataGridView be setup to bind to just one record across multiple rows?