SharedDataTableKey - CurrentRow Index out of range


Author
Message
Tim Dol
Tim Dol
StrataFrame User (436 reputation)StrataFrame User (436 reputation)StrataFrame User (436 reputation)StrataFrame User (436 reputation)StrataFrame User (436 reputation)StrataFrame User (436 reputation)StrataFrame User (436 reputation)StrataFrame User (436 reputation)StrataFrame User (436 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
I have two forms sharing the same business object and I'm using the SharedDataTableKey feature and set the SharedDataTableKeyShareRowIndex = True.

In general everything work fine however when I try to access one of the fields on my business object, Example MyBO.RecID... I get an error CurrentRow Index out of range.

I tried navigating to a specific row before opening my child form and it still happens.  Do I have to set something else?

Thanks

Tim

Richard Keller
Richard Keller
StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)StrataFrame User (134 reputation)
Group: Forum Members
Posts: 84, Visits: 324
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
In general everything work fine however when I try to access one of the fields on my business object, Example MyBO.RecID... I get an error CurrentRow Index out of range.

I tried navigating to a specific row before opening my child form and it still happens.  Do I have to set something else?

I could see this happening in a multitude of circumstances when using a shared data table and allowing the index to be moved as well.  The reason that this could happen is that a filter or sort may be applied or a binding related issue.  If you are using a shared data table accross multiple BOs that allow that record to be modified on two different forms, then I would rethink this logic.  Richard pointed to another post that he placed, and I asked him for a sample and gave some additional explanation.  You are welcome to shoot me a simple sample reproducing the issue as well since his may be a different scenario.

The shared data table is a great feature, but should not be use everywhere.  If you have a BO on a maintnenace for maintaining a record, I would lean away from allowing that BO to use a shared data table if at the same time you are going to be allowing that same data table to be manipulated by another dialog or BO.

The shared data table is a great way to have a cache that is commonly referenced, but this is not a wholesale solution for every BO (which I don't think that you are using).  Just some comments I thought I would add for those using the shared data table on a lot of BOs.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search