.NewRow() doesn't move the newly added row


Author
Message
Leonard P.
Leonard P.
StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)
Group: Awaiting Activation
Posts: 65, Visits: 306
Hi,

I am seeing this behavior in StrataFrame:

When calling .NewRow() inside one of the BO methods, the current row position doesn't change to the new row as per documentation.





this.NewRow();

Debug.WriteLine(this["IndexId"].ToString()); //Expect to see -1, but it's not the case

Debug.WriteLine(this.CurrentRow.RowState.ToString()); //Expect to see 'Added', but get 'Unchanged' instead





Either I am doing something wrong or it's a bug in SF Wink
Replies
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
If you are using a BBS and under certain other conditions, there was a bug where the index would not move.  This was ono a different thread wth Anrdia and another with Greg and was fixed a while back.  If you load the most recent beta this has already been addressed.  Otherwise, you will have to wait until the final build before I can give you an assembly to resolve this issue.

Go here: http://forum.strataframe.net/FindPost21409.aspx and look at #19.

Leonard P.
Leonard P.
StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)
Group: Awaiting Activation
Posts: 65, Visits: 306
Hi Trent,

I've installed the latest beta version from the link you provided, but it didn't resolve this issue. It's still happening. Sad

Can you advise if there's anything I need to do?



Thanks
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
You will have to provide a sample then as I know that this works.  Most likely there is something in your code that is preventing the record from moving or moving it back.  Please provide a sample so that we can look.
Leonard P.
Leonard P.
StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)
Group: Awaiting Activation
Posts: 65, Visits: 306
Most likely there is something in your code that is preventing the record from moving or moving it back. Please provide a sample so that we can look.




Hi Trent,

You are absolutely right; there's probably something in my code. I tried to isolate this problem in a smaller test project. So, I created a new project with test BO, BusinessBundingSource, DataGridView, and an Add Button, but I wasn't able to reproduce it.

While in the original project where it's happening, I have some additional code in SetDefaultValues event of a base class. Probably something in there that offsetting the record position.

I am going to do more research on my end. Hopefully I can crack this thing on my own here, if not we will be chatting again Smile



Thanks for your help.



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Leonard P. - 16 Years Ago
Dustin Taylor - 16 Years Ago
Leonard P. - 16 Years Ago
Edhy Rijo - 16 Years Ago
Leonard P. - 16 Years Ago
                         If you are using a BBS and under certain other conditions, there was a...
Trent L. Taylor - 16 Years Ago
                             Hi Trent,
I've installed the latest beta version from the link...
Leonard P. - 16 Years Ago
                                 You will have to provide a sample then as I know that this works. Most...
Trent L. Taylor - 16 Years Ago
                                     [quote] Most likely there is something in your code that is preventing...
Leonard P. - 16 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search