Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Boxes.
Message
From
10/12/2003 09:51:23
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
 
 
To
09/12/2003 17:37:23
General information
Forum:
ASP.NET
Category:
Forms
Title:
Miscellaneous
Thread ID:
00857406
Message ID:
00857640
Views:
30
Bonnie,

Instead of doing a databind, could I just set the properties like in the code below? What event within the combo box should I write the code to refresh the other combo boxes? I currently have it in the selectedvaluechange event.

Jim
    Private Sub getProjects()
        dsTimeCollection.Tables("project").Rows.Clear()
        daProjects.Fill(dsTimeCollection, "Project")
        BindCombo(cboProjects, dsTimeCollection, "Name", "project", "project_id")
    End Sub

    Private Sub BindCombo(ByVal combo As System.Windows.Forms.ComboBox, ByVal dataset As DataSet, ByVal DisplayMember As String, ByVal TableName As String, ByVal ValueName As String)
        combo.DataSource = dataset.Tables(TableName)
        combo.DisplayMember = DisplayMember
        combo.ValueMember = ValueName
    End Sub
>Jim,
>
>There was a discussion awhile back concerning DataBinding properties to Combos. Check out Thread# 828163, in particular, Message# 828757 (and a few other back-and-forth posts between Steve and I). It may (or may not <g>) shed some additional light on the subject for you.
>
>~~Bonnie
Thanks

Jim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform