Results 1 to 5 of 5

Thread: [RESOLVED] Developing a two demensional grid on a form

  1. #1

    Thread Starter
    Member
    Join Date
    May 2006
    Posts
    35

    Resolved [RESOLVED] Developing a two demensional grid on a form

    Hi Teches

    I have been requested to develop a two demensional grid in which data can be entered on a form. I am working with VB.Net on a windows 2000 system and an Access DB. The columns of this grid will be months and the rows will be entries for the months. Additionally I have been requested to have prior and next buttons to bump down to prior months and bump up to future months. The grid must rotate to the left for prior months and to the right for future months. I have attempted using the Datagrid function but find it too restrictive. I am currrently looking at adding approximately 80 textboxes to the form but this is very tedious. Can ahyone offer a simpler alternative?

  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: Developing a two demensional grid on a form

    A picture says a thousand words.... Perhaps if you include a sketch of what your grid should look like it will help a lot in trying to visualize it.

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Developing a two demensional grid on a form

    What is restrictive about the Datagrid?

    I can think of a potentially twisted solution involving a ListView and a phantom TextBox, but I can't imagine what advantage it would have over the DataGrid.
    My usual boring signature: Nothing

  4. #4

    Thread Starter
    Member
    Join Date
    May 2006
    Posts
    35

    Re: Developing a two demensional grid on a form

    As I understand the datagrid functionality through its properties I can point to a dataset which points to the database. I can't rotate my columns without an index/pointer from the database.


    Example:

    prior 2006 next
    Jan Feb March April
    Entry 1 xx yy zz 99
    Entry 2 pp qq rr 88

    After pressing the prior button the imagry should look like this.

    prior 2005 next

    Dec Jan Feb March
    Entry 1 aa xx yy zz
    Entry 2 bb pp qq rr

    Do you guys have any suggestions?

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Developing a two demensional grid on a form

    What exactly does this data look like in the database? I don't see how you can possibly have a column for each month because that would mean that the number of columns in your table would keep growing indefinitely. If that is indeed how your data is structured then that's a MAJOR flaw. If it's not and you are massaging the data into that form in code then there's no reason that you also can't remove a column at one end and add one at the other when the user wants to go forward or back by month. You could do so by either changing the visibility of columns in the grid, adding and removing columns in your data source or shuffling data in existing columns. That's basically what you'd be doing with individual controls anyway.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width