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
1622
Adding rows to a child band
posted

Hello,

I have created a sample project that demonstrates an issue i am having when adding rows to a child band at runtime.  I am attempting to load text that a user types into a form i created, and to analyze the amount of text so i only have 5 lines per cell, and the the rest of the text will be put into a newly created row.

Please run the sample, and then when you click on a child bands cell to get my form to load up.  paste the following text in there, and click the OK button:

This is a test of sentence one. And this is more text for sentence one.

This is a test of sentence two.

This is a test of sentence three.

This is a test of sentence four.

This is a test of sentence five.

This is a test of sentence six.

It appears to add the rows just fine, but it seems now that you can't get the cell to go back into edit mode unless you click on a different row and then back on the bottom row of the band.  Also, it appears some of the text in the first row is selected. 

I would like it so after i create the rows, if i click on either of those edited rows again, my form comes up.  Please let me know if there is any confusion, but the sample should demonstrate what is going on.

-Chris

TestAddingRowsToGrid.zip
Parents
  • 69832
    Verified Answer
    Offline posted

    I took a quick look at this and the problem is that you are doing things in the BeforeEnterEditMode event handler that you shouldn't be doing, like clearing the ActiveCell and adding new rows. When execution returns from the BeforeEnterEditMode event, the grid expects the ActiveCell to be set to something and if it isn't the results will be unpredictable. I'm afraid I was not able to fully grasp what the code in the BeforeEnterEditMode handler is trying to accomplish, but my guess is you just have to execute it in response to some other trigger.

Reply Children
No Data