Datagrid control problem


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Datagrid control problem

  1. #1
    Heath Guest

    Datagrid control problem


    I have a form set up to display a master detail relationship between two tables,
    that part is working fine, when I scroll through the master records the correct
    child records show up in the datagrid without any problems. Now if I go to
    edit existing child records using the datagrid no problems
    there either. The updates go as expected.
    I can add child records to the table using the datagrid ONLY if I have just
    added the corresponding master record. Or to the first master record.
    I cannot add new child records to any pre-existing master record than the
    first.
    When I try to add a new child record to some other pre-existing master record
    using the datagrid, I get an error ' The current row is not available' which
    has an error number of 7008. This error code is returned in the datagrid
    error event and I have not been able to find any documentation about it either.
    I
    have also found that when I try to add a new child record to an existing
    master none of the before/after events are firing in the grid. Usually when
    you first type a character the before and after insert events fire, followed
    by an onaddnew event. None of these events are happening when I try to add
    a new child record to an existing master record.

    Using Visual Basic 6.0 service pack 4
    Any ideas on what is causing this and what to look for to resolve this?


  2. #2
    Dennis Guest

    Re: Datagrid control problem


    "Heath" <hshoup@yahoo.com> wrote:
    >
    >I have a form set up to display a master detail relationship between two

    tables,
    >that part is working fine, when I scroll through the master records the

    correct
    >child records show up in the datagrid without any problems. Now if I go

    to
    >edit existing child records using the datagrid no problems
    >there either. The updates go as expected.
    >I can add child records to the table using the datagrid ONLY if I have just
    >added the corresponding master record. Or to the first master record.
    >I cannot add new child records to any pre-existing master record than the
    >first.
    >When I try to add a new child record to some other pre-existing master record
    >using the datagrid, I get an error ' The current row is not available' which
    >has an error number of 7008. This error code is returned in the datagrid
    >error event and I have not been able to find any documentation about it

    either.
    > I
    >have also found that when I try to add a new child record to an existing
    >master none of the before/after events are firing in the grid. Usually

    when
    >you first type a character the before and after insert events fire, followed
    >by an onaddnew event. None of these events are happening when I try to

    add
    >a new child record to an existing master record.
    >
    >Using Visual Basic 6.0 service pack 4
    >Any ideas on what is causing this and what to look for to resolve this?
    >

    I believe VB6 SP4 installed MDAC 2.5, which has some bugs with the datagrid
    control. These may be some of them.

    Dennis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center