On the leave focus event of the textbox (or whereever you need it), all you have to do is:
http://forum.strataframe.net/Topic18700-6-1.aspx[/quote]
Rafael, you could not be getting the same error:[quote]BusinessLayerException The ParentBusinessObject property must be set before FillByParent can be called with no parameters supplied.
since the method to populate the BO could not be FillByParent. Can you post an screenshot of the List View Population Settings, I would like to see what you have in the Method to Execute.
Here is an example of what I use in one of my forms:
In this case I use the CopyDataFrom(BusinesLayerBase,BusinessCloneDataType) because I have an instance of the bizBuildings BO in the form and I simply update that BO instance and the listview will copy all records to the ListView internal BO. I find this method easier to maintain.
P.S
I'll be online for a couple of hours in case you want to pursue with this issue.
http://forum.strataframe.net/Topic18700-6-1.aspx
Are you getting any specific error? or just the listview is not being populated?
private void lvPedidoCompraItem_ListPopulating(ListPopulatingEventArgs e) { e.Parameters[0].Value = this.sysPedidoCompraItemBO1; e.Parameters[1].Value = MicroFour.StrataFrame.Business.BusinessCloneDataType.ClearAndFillFromDefaultView; } private void lvPedidoCompraItem_RowPopulating(RowPopulatingEventArgs e) { //-- Establish Locals sysPedidoCompraItemBO loBO = ((sysPedidoCompraItemBO)e.BusinessObject); //-- Set the not count //e.Values[1].DisplayValue = CustomerNotes.GetNoteCount(loBO.cust_pk).ToString("n0"); }
private void lvPedidoCompraItem_RowPopulating(RowPopulatingEventArgs e) { //-- Establish Locals sysPedidoCompraItemBO loBO = ((sysPedidoCompraItemBO)e.BusinessObject);
//-- Set the not count //e.Values[1].DisplayValue = CustomerNotes.GetNoteCount(loBO.cust_pk).ToString("n0"); }
But i use
e.Parameters[0].Value = for_cod.Text;
sysPedidoCompraItemBO loBO = ((sysPedidoCompraItemBO)e.BusinessObject);
Please say me a method that used in populate listview and i search in documentation.
You could pass the parameter in the Requery method of the ListView:
MyListView.Requery(myCoolParameter);
But, as I found out over time, it is better to pass the parameter in the ListPopulating event of the ListView (from docs using VB):
Then, whenever you need to refresh the ListView control, it is a simple call to its Requery method:
MyListView.Requery();
No need to remember to pass a parameter since it is handled in the event. Good stuff. A "set it and forget it" type of approach.
Whoa.
Thanks!