StrataFrame Forum

MethodToExecute on a Listview with parameters.

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

By Justin Buist - 2/19/2007

This is so simple I probably just need to be pointed to an area in the manuals, but I cannot seem to find the answer on my own.



I've got a ListView on a WebForm with the following PopulationDataSourceSettings:



<PopulationDataSourceSettings BusinessObjectType="BusinessObjects.AttributeNameType"

DisplayFieldNames="Name|TypeName|AttributeNameID|" MethodToExecute="FillByEntityTypeIDAndEntityID;System.Int32,System.Int32">



When I look at the SQL Debugging I see that the query was executed but with 0's in the where clause where the EntityTypeID and EntityID would be.



For the life of me I can't figure out where I'm supposed to supply those values!



Any help would be appreciated.




By Trent L. Taylor - 2/19/2007

It is because you did not provide the parameter value in the ListPopulating event of the ListView. You can see an example of this in the Web Sample or the Advanced ListView sample...amongst others.  You can find this in the help under:

Application Framework -> UI Layer -> Controls -> ListView Population

The web population behaves the same as the WinForms in regards to the events.

By Justin Buist - 2/19/2007

Ahhh. Yes. I was off looking at BO-related documentation and not UI documentation.



Thanks for putting me on track. Everything is all wired up and working exactly like I expected it to.



Thanks!
By Trent L. Taylor - 2/19/2007

Great!  Always remeber that you can search within the docs as well.  For example, you could search on ListView and see what shows up Smile  Just FYI since at one point the search did not work Blush