Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
170
Adding child row to newly added parent row
posted

I am not sure what I am doing wrong here and am hoping it is something simple I am overlooking!  I have seen this situation before, but was able to get it working with using bindingsource.endedit().  I have a 2 level dataset with parent-child relationship.  In my single-band grid, I have a button on each parent row, with which a user will click to add/edit the child rows.  The problem I am having is on adding a new parent row, and then clicking the button, that new parent row is not yet in the dataset - causing an error in trying to add the child row since it cannot find the key it wants for the parent row.  I have tried row.update, bindingsource.endedit, grid.updatedata....nothing seems to push this data to the dataset.  I also tried some performaction calls for commit row, exiteditmode, etc.  I can provide more information on how i edit for the child rows, if needed. 

 Thanks in advance for any input,

Dusty

Parents
No Data
Reply
  • 170
    Verified Answer
    posted

    Ok - nevermind - I figure'd it out - had an issue where my datasource was not getting set properly.  Sorry!

     

    Thanks,

    Dusty

Children
No Data