StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
Business Objects and Data Access (How do I?)
»
ListView, BO, and passing a Dictionary to the BO's Fill()
ListView, BO, and passing a Dictionary to the BO's Fill()
Post Reply
Like
0
ListView, BO, and passing a Dictionary to the BO's Fill()
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Alex Luyando
Alex Luyando
posted 14 Years Ago
ANSWER
Topic Details
Share Topic
Group: StrataFrame Users
Posts: 112,
Visits: 1.2K
H-
Having an issue filling a listView based on a BO filled using a stored procedure. Will try to distill the scenario below, hopefully not omitting any key elements.
--- Intro --------------------------------
The BO has a fill method with the following signature.
public void FillAfterRefresh(Dictionary
tdictParameters)
The dictionary passed in includes values used as parameters in the call to the stored procedure.
The form has a listVview on it, that I want to populate using the result set returned by the stored procedure. It is set to manually populate, and I've specified the appropriate BO class and the above fill method.
For testing/debugging purposes I've thrown a few controls on the form as well and bound them to BO fields.
--- Observations/Problems ---------------------------------
1.) If I drop an instance of the BO onto the form, and call the above Fill method, passing a reference to a dictionary in as the lone argument, the fill works great (confirmed via the debugger and by being able to view the results in the test controls on the form).
2.) When I attempt to set the List View Population Settings, I see my fill method, but the parameter shows as (Dictionary`2). Not sure what's up with this? (But, willing to run it anyway since it compiles.) Note: See attached PNG.
3.) If I try to call the listview's requery, passing in the dictionary (either in the requery call or in the ListPopulating event using e.Parameters[0].Value = this.oDictUserInfo
I get an immediate error at runtime:
Dynamically populating the ListView failed. Could not create and fill the business object of type 'IndexReviewSystem.Business_Objects.Reporting_Objects.boIRSPredictiveCompositionNullProblems'
Inner Exception Message: "Dynamically populating the ListView failed. Type 'System.Collections.Generic.Dictionary`2[[System.String' could not be found."
Can someone help me make sense of this?
I feel I have a workaround as I can put a BO on the form, fill it, then copy the filled datatable to the listview's internal datatable. I feel, however, I shouldn't need to do that… I'd really like to understand what's going on.
TIA
________________
_____/ Regards,
____/ al
Attachments
tmp2-10-2010 12-03-40 PM.png
(
128 views,
14.00 KB
)
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
ListView, BO, and passing a Dictionary to the BO's Fill()
Alex Luyando
-
14 Years Ago
I will respond to this in more detail later, but the long and short of...
Trent L. Taylor
-
14 Years Ago
Hey Trent -
Thanks for the super-quick reply. No need for...
Alex Luyando
-
14 Years Ago
Yeah, that would work. You could also turn it into a KeyPair array...
Trent L. Taylor
-
14 Years Ago
Hey Alex - Since you wouldn't accept my advice to check out Buffy as...
Charles R Hankey
-
14 Years Ago
LOL Charles... I figured enough time has passed and you would have...
Alex Luyando
-
14 Years Ago
Wow... nice stuff, Charles! That can be VERY useful in many...
Alex Luyando
-
14 Years Ago
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search