StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
Business Objects and Data Access (How do I?)
»
Why is this weirdness needed?
Why is this weirdness needed?
Post Reply
Like
0
Why is this weirdness needed?
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Greg McGuffey
Greg McGuffey
posted 17 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 2K,
Visits: 6.6K
I pulled this code form the code that loads a combo/list from an enum (I think). There is mention of some .NET weirdness that requires this. I'm wondering if you could shed a bit of light on why this is done? (Setting the display member and value member to ZLS, then to their actual values, then setting datasource, then setting them again!)
Private Sub SetDataSource(ByVal combo As SF.ComboBox _
, ByVal DataSource As Object _
, ByVal DisplayMember As String _
, ByVal ValueMember As String)
combo.BeginUpdate()
combo.DataSource = Nothing
combo.DisplayMember = String.Empty
combo.ValueMember = String.Empty
combo.DisplayMember = DisplayMember
combo.ValueMember = ValueMember
combo.DataSource = DataSource
combo.DisplayMember = DisplayMember
combo.ValueMember = ValueMember
combo.EndUpdate()
End Sub
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
Why is this weirdness needed?
Greg McGuffey
-
17 Years Ago
The problem generally occurs when there is an event handler on the...
StrataFrame Team
-
17 Years Ago
Goodness, that must have been a fun one to track down! Thanks for the...
Greg McGuffey
-
17 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