UltraGrid (InitializeRow) fires at will


Author
Message
Michael Reese
Michael Reese
StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)
Group: StrataFrame Users
Posts: 235, Visits: 1.6K
Here is an example of what is happening.

I have the grid attached to a BBS and is calling a Childform. As I type in the controls, the BO seems to be moving through the records as you can see from the attached zipped flash demo.  

Michael

Edit Code from Calling Form

Private Sub cmdEdit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdEdit.Click

'Get and Set the Company ID from the Row being called

Dim LocCompanyID As Integer = GridData.ActiveRow.Cells("cusRecParID").Value

aBOMain.SeekToPrimaryKey(Me.GridData.ActiveRow.Cells("recRecID").Value)

'-- Show the child editing form

If ChildServiceForm.ShowDialog(LocCompanyID) = Windows.Forms.DialogResult.OK Then

Else

'-- Undo the changes to the current row

aBOMain.Undo(BusinessUndoType.CurrentRowOnly)

End If

End Sub


Attachments
SampleBOissue_demo.zip (128 views, 725.00 KB)
Michael Reese
Michael Reese
StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)
Group: StrataFrame Users
Posts: 235, Visits: 1.6K
I know. I hope that this is not an issue with Version 2008.1? I do not think that I saw this behavior before?
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
Well, that does sound suspect...but this is a highly used control, by SF developers (including ourselves) and this is the first time I have ever heard of this behavior.
Michael Reese
Michael Reese
StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)
Group: StrataFrame Users
Posts: 235, Visits: 1.6K
Ok Trent,

I will try to put something together. I do not think that I am doing anything special?

Could the execution of InitializeRow be because the BO on the parent and child are the same? As I am entering data in editmode (before save) in the Childform, the parentform BO seems to be trying to populate as well?

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
This sounds like more of a Grid issue versus a BBS/BO issue.  We actaully use this grid in a number of places and amongst the 3500+ properties BigGrin there could be something set that is changing the behavior of the grid.  Honestly, these types of questions are really hard to help with without some type of sample that reproduces the problem.  If you produce a simple sample that reproduces the problem then I will take a gander at it to see if I can tell where the issue is.  Thanks. Smile
Michael Reese
Michael Reese
StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)
Group: StrataFrame Users
Posts: 235, Visits: 1.6K
I have a Grid on my main form attached to a BBS. I also have a childform attached to the BO which is attached to the BBS. I also have the standard add edit code (BO.ADD,BO.EDIT in the childform not in the mainform) calling the child form.

The problem seems to be that the Grid's InitializeRow seems to not only fire when the grid initially(as it should) loads, it also fires when I call a BO.ADD and load of the childform? It seems to get called when I am in edit mode as well? I set the debugger and discovered that it fires while I am entering data in fields on the subform?

SF = Latest Version (Beta)

Ultragrid 2008.1

VS 2008

Michael

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