Results 1 to 6 of 6

Thread: [RESOLVED] First thread & help needed

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2006
    Posts
    35

    Resolved [RESOLVED] First thread & help needed

    Hello guys/girls

    I have a slight problem. I'm supposed to develop an small application for my company without databases.

    I want to have grid with choices. The first column & rows is from monday to sunday. The next couple of columns has to do with time.

    Drawing:


    I thought about using a DataGridView.

    Problem: If somebody enters info in monday row & friday row, then how do I extract the info? I must somehow check the rows for entered info. If tueday is empty then how do I know?

    Version: VB Express 2005


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

    Re: First thread & help needed

    Sounds like you need to do some reading on the DataGridView. I suggest that you go to the MSDN2 library (see my signature for a link) and search for "DataGridView". You'll get plenty of matching articles and help topics that will tell you all about using one.
    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

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2006
    Posts
    35

    Re: First thread & help needed

    Quote Originally Posted by jmcilhinney
    Sounds like you need to do some reading on the DataGridView. I suggest that you go to the MSDN2 library (see my signature for a link) and search for "DataGridView". You'll get plenty of matching articles and help topics that will tell you all about using one.
    Thanks, that helped somewhat. But I can't figure out how to add a single cell value to one column. (like the drawing)

    I can add rows but now the cell values (monday - sunday). The other column cells should have no value at all.

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

    Re: First thread & help needed

    I just knocked this form up with no DataGridView experience. I added three columns, disabled adding and deleting and made the first column read-only. I then add this code:
    VB Code:
    1. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.         Me.DataGridView1.Rows.Add("Sunday", Nothing, Nothing)
    3.         Me.DataGridView1.Rows.Add("Monday", Nothing, Nothing)
    4.         Me.DataGridView1.Rows.Add("Tuesday", Nothing, Nothing)
    5.         Me.DataGridView1.Rows.Add("Wednesday", Nothing, Nothing)
    6.         Me.DataGridView1.Rows.Add("Thursday", Nothing, Nothing)
    7.         Me.DataGridView1.Rows.Add("Friday", Nothing, Nothing)
    8.         Me.DataGridView1.Rows.Add("Saturday", Nothing, Nothing)
    9.     End Sub
    Attached Images Attached Images  
    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

  5. #5

    Thread Starter
    Member
    Join Date
    Feb 2006
    Posts
    35

    Re: First thread & help needed

    That solved my problem... thanks alot!

  6. #6
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: First thread & help needed

    If your thread is resolved, you can go to the top under "thread tools" and mark it as "resolved". Welcome to the forum

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