DataGrid Click event not fire-VBForums
Results 1 to 6 of 6

Thread: DataGrid Click event not fire

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    14

    DataGrid Click event not fire

    Dear All,

    i have met a very strange problem.

    i have a datagrid connect to a recordset which will update during program. the datagrid is set to single record select. fullrow highlight

    problem is, when i click 2nd row on the datagrid for 1st time, it will change to 2dn row, then i click 1st row, it go 1st row. now i click again 2nd row, the datagrid will not more function. it highlight 2 row... the datagrid_click event totally not fire. but, if i put a breakpoint at 1 of the line in code, it will go to fire the event, but after i remove the breakpoint. it goes crazy again.

    i using VB6 sp6.

    Thanks for help in advance.

  2. #2
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: DataGrid Click event not fire

    Post the code from your click event.

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    14

    Re: DataGrid Click event not fire

    Private Sub DGMainSub_Click()
    MonthView1.Visible = False
    Saved = False
    End Sub

    this my code.. Saved is a global variable. i place a break point at Monthview1 then is will go here, but i remove the breakpoint, it skip the click event...
    i tried put a debug.print in front the monthview1 without breakpoint, but it will not do anything as well. please help

  4. #4
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: DataGrid Click event not fire

    What do you want to do exactly? Setting Visible to False will make the grid control disappear from the screen/form completely.

    EDIT: So, it's 6:30 AM (working all night) and I now see that I made a mistake there. You're not setting the grid's Visible property but a MonthView's. I think there is a bug in MonthView control. I remember someone was writing about it and I did some investigating. Let me try and find that thread for you.

    EDIT2: Got it. It's different problem, but related to MonthView. Look at post #2 with my comments. Other posts might provide some more info http://www.vbforums.com/showthread.p...ight=monthview
    I'm really losing concentration to look into it more now. I'll follow up tomorrow.
    Last edited by baja_yu; Sep 26th, 2010 at 11:40 PM.

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    14

    Re: DataGrid Click event not fire

    hi, thanks for reply.

    my problem is not related to visible any control. i just want to do select within records in my datagrid.
    but i just unable to select other records after i had select first and second record. i had do the coding in datagrid click event is for other perform. so problem i met is the highlighted word above. thanks for help

  6. #6

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    14

    Re: DataGrid Click event not fire

    Dear all, my problem solved.

    Everytime is like that... the solution is what i really dun want to do, bcos i dun think Microsoft so lousy...

    the solution is delete the control and drag a new one. problem solved~~ thanks

Tags for this Thread

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.