.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
Reply
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