StrataFrame Forum

Problem with UserControl and BBS and BO CurrentRowIndex

http://forum.strataframe.net/Topic22327.aspx

By Rainer Kempf, RK - 3/12/2009

Hello



I try to solve a problem since nearly 10 hours.

I looked all the samples, Sourcecode from Strataframe but can't find solution. seems i am to stupid for

this task.



I had a SF-Usercontrol.



In this usercontrol i add a Strata-EnhancedList.

Add some properties for Datasource so i can set Datasource outside the Usercontrol.



Then compile all fine.



Drag the Control on a form, setup Datasource over BBS.



Also all fine. All works



The only thing i can't get running is when Row changes BO will not move record pointer.

CurrentRowIndex is always 0



If i place EnhancedList directly on form and work with BBS then Record-Pointer will move.



So where to hell is my Logical Error.



I hope somebody can help me.............Hehe



i am using the latest beta...



thanks a lot



Rainer












By Trent L. Taylor - 3/12/2009

I am assumging that you are using the BO translations through the user control.  For grins, override the OnLoad of the user control and AFTER the MyBase.OnLoad(), reset the BO instances on the BBS.

Protected Overrides Sub Onload()
   MyBase.OnLoad()

   MyBBS.BusinessObject = MyBO
End Sub

The instance of the BO may not be getting reset or reloaded dur to the translations.  So this will ensure that it gets reset. Do the same for any other BO instances on the control.

By Rainer Kempf, RK - 3/12/2009

Hello Trent,



No i don't use translationobject.



I handle setup of columns all in DevExpress.Grid.



also not clear for me which onload i should overwrite.....Hehe



thanks for you help



Rainer
By Trent L. Taylor - 3/12/2009

Well, then how are you getting the BO loaded within the user control?
By Rainer Kempf, RK - 3/12/2009

Hello Trent,



I add a property to SF-UserControl.









Public Property pmks_GridDataSource() As MicroFour.StrataFrame.Business.BusinessBindingSource



Get

Return _pmks_GridDataSource

End Get



Set(ByVal value As MicroFour.StrataFrame.Business.BusinessBindingSource)

_pmks_GridDataSource = value

GridControl.DataSource = value

End Set



End Property







I placed Control on Form.



then i setup this property over properties window



i assign this property BBS-Object.



then call BO.Filldata("Select.....")



Population of Control is Manual....



thats all



thanks



Rainer


By Rainer Kempf, RK - 3/12/2009

Hello Trent,



Did you see my Answer on your last post ?



thanks



Rainer
By Trent L. Taylor - 3/12/2009

From what you ahve provided it is really hard to tell.  Do you have a filter or a sort on the BO?  Otherwise, you are going to have to post a sample so that I can see it in action.
By Rainer Kempf, RK - 3/13/2009

Hello Trent,



I solved problem now in another way.



I get from the tag field of Gridcontrol value and then seek in BO



so all fine.



I didn't post a sample because all Controls base on Devexpress. (newest Version 8.3.5)

and i think you don't use this controls as i read in other threads.



Thank you in anyway



Rainer






By Trent L. Taylor - 3/14/2009

Glad you got it working. Smile