Results 1 to 5 of 5

Thread: DataGridViewComboBoxColumn in MDI Child Form

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2012
    Posts
    3

    DataGridViewComboBoxColumn in MDI Child Form

    Hi,
    I have a main form having the MDI Parent Control. I have a menu toolstrip menu "set status" which opens a Child Form having a DataGridView. The DataGridView has a DataGridViewComboboxColumn which is populated from a SQL CE database.
    The problem is that when i open this "Set Status" Form as a Child form then DataGridViewComboBoxColumn works abruptly, while when i open "Set Status" form as separate form, it just work perfect! I can not understand what is the problem??

    When user click "Set Task" MenuStrip, following code is executed:

    Code:
    Private Sub SetStatusToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SetStatusToolStripMenuItem1.Click
    
    Tasks.MdiParent = Me
    Tasks.Show()
    
    End Sub
    Please suggest any solution?

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

    Re: DataGridViewComboBoxColumn in MDI Child Form

    What exactly do you mean by abruptly?

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2012
    Posts
    3

    Re: DataGridViewComboBoxColumn in MDI Child Form

    I have attached two snapshots. The DataGridViewComboBoxColumn is added randomly at any column index in DataGridView every time i click custom made filter. While it is all working fine if i does not include it in MDI Parent Form
    Attached Images Attached Images    

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

    Re: DataGridViewComboBoxColumn in MDI Child Form

    It sounds like you have a situation where at least one of the cells in that column has a Value that does not correspond to one of the items in the drop-down list. That could be an issue with the way that you're binding, e.g. the grid is bound before the column.

  5. #5

    Thread Starter
    New Member
    Join Date
    Apr 2012
    Posts
    3

    Re: DataGridViewComboBoxColumn in MDI Child Form

    I guess there is a problem in binding the data... i'll look at it later, right now i'll put this out of the MDI Parent form to keep things going.. thanks for your help

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