BO does not navigates to the new row for editing


Author
Message
dgsoft
dgsoft
StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
Hi,

In my baseclass I try to add new row.

1) I have an Treeview with DataSource as BBS

2) I get reference to BO over BBS.BusinessObject

3) Try to add new record with BO.add()

4) Try to update some properties of BO



As result - I update properties of row, where currently cursor located. and after .Add() pointer does not navigates new row. Why?



Here is completed code for this



If Not IsNothing(Pmks_treeview) Then

If Not IsNothing(Pmks_treeview.DataSource) Then

Dim loBBS As MicroFour.StrataFrame.Business.BusinessBindingSource = TryCast(Pmks_treeview.DataSource, MicroFour.StrataFrame.Business.BusinessBindingSource)

If Not IsNothing(loBBS) Then

Dim loBO As MicroFour.StrataFrame.Business.BusinessLayer = TryCast(loBBS.BusinessObject, MicroFour.StrataFrame.Business.BusinessLayer)

Dim lcParentId_Field As String = Pmks_treeview.ParentFieldName

If Not String.IsNullOrEmpty(lcParentId_Field) Then

loBO.Add()

loBO.GetType().GetProperty(lcParentId_Field).SetValue(loBO, tnParentId, Nothing)

If Not String.IsNullOrEmpty(Pmks_treeview.pmks_group_caption_fieldname) Then

loBO.GetType().GetProperty(Pmks_treeview.pmks_group_caption_fieldname).SetValue(loBO, Pmks_treeview.pmks_default_group_caption, Nothing)

End If

loBO.Save()

End If

End If

End If

End If



Thanks

Denis
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