StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
WinForms (How do I?)
»
Binding an Enhanced List at runtime
Binding an Enhanced List at runtime
Post Reply
Like
0
Binding an Enhanced List at runtime
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Andria Jensen
Andria Jensen
posted 18 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 336,
Visits: 497
I'm trying to use a generic form to maintain several different tables in the database. They all use the same form, but just different data sources. What is the best way to do this in code at run-time instead of setting it through the designer at design time? I figure I need to set some properties of the PopulationDataSourceSettings, but what I'm doing hasn't been working. Here's the code I've got so far to bind the grid, and maybe someone can tell me what I have missing.
Public
Class
frmSFTableBase
Public
Sub
New
(
ByVal
HdrBO
As
BusinessLayer,
ByVal
HdrValue
As
String
)
Me
.BusinessObjects.Add(HdrBO)
Me
.grdHdr.PopulationDataSourceSettings.BusinessObjectType =
"BBS.Biz.BizTypeBO"
Me
.grdHdr.PopulationDataSourceSettings.ValueMember = HdrValue
Me
.grdHdr.PopulationDataSourceSettings.MethodToExecute =
"FillDataTable()"
Me
.grdHdr.PopulationDataSourceSettings.DisplayFieldNames.Add(HdrValue
)
Me
.grdHdr.PopulationDataSourceSettings.FormatColumns.Add(
"{0}"
, MicroFour.StrataFrame.UI.ListViewColumnPopulationType.FormattedString)
Me
.InitializeComponent()
End
Sub
Private
Sub
grdHdr_ListPopulating(
ByVal
e
As
MicroFour.StrataFrame.UI.ListPopulatingEventArgs)
Handles
grdHdr.ListPopulating
e.Parameters(0).Value =
"SELECT * FROM BizType"
End
Sub
End Class
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
Binding an Enhanced List at runtime
Andria Jensen
-
18 Years Ago
You can set the properties of the EnhancedList at runtime, but you...
StrataFrame Team
-
18 Years Ago
Ok, I now have this: Me...
Andria Jensen
-
18 Years Ago
Oh, and my grid is actually the Enhanced List control from the DevX...
Andria Jensen
-
18 Years Ago
Ok, it looks like you have to populate a ListViewPopulationSettings...
Andria Jensen
-
18 Years Ago
Yes, this is what we normally do as well. Glad you got going.
Trent L. Taylor
-
18 Years Ago
Guys, How do you set up MethodToExecute if there is no parameter for...
Geoff Hirst
-
16 Years Ago
[quote]How do you set up MethodToExecute if there is no parameter for...
Trent L. Taylor
-
16 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