Listview


Author
Message
Rafael
Rafael
StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)
Group: Forum Members
Posts: 48, Visits: 216
For population in Load Form, i configured populationDataSourceSetings and implemnt this code:

        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");
        }

But i use   

e.Parameters[0].Value = for_cod.Text;
and delete
sysPedidoCompraItemBO loBO = ((sysPedidoCompraItemBO)e.BusinessObject);
, when initialize form with error.

Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
So it is now working for you?

Edhy Rijo

Rafael
Rafael
StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)
Group: Forum Members
Posts: 48, Visits: 216
no
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Ok, even though I use VB your code looks good, all you have to do now is just requery the ListView control in one of the places mentioned by Bill, in the Textbox control or in the Page's Activate.

Are you getting any specific error? or just the listview is not being populated?

Edhy Rijo

Rafael
Rafael
StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)StrataFrame Novice (50 reputation)
Group: Forum Members
Posts: 48, Visits: 216
The error is first post this topic Smile

http://forum.strataframe.net/Topic18700-6-1.aspx

Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Rafael (08/26/2008)
The error is first post this topic Smile

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.

Edhy Rijo

Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
If your "Method to Execute" on the ListView is set to the BO fill method as I outlined above (FillByTextBoxValue(string pTextBoxValue)), then all you need in the ListPopulating event is the following:


private void lvPedidoCompraItem_ListPopulating(ListPopulatingEventArgs e)
{
    e.Parameters[0].Value = for_cod.Text;
}

On the leave focus event of the textbox (or whereever you need it), all you have to do is:


lvPedidoCompraItem.Requery();

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