Advertisement

05.06.2008 at 11:43PM PDT, ID: 23381801
[x]
Attachment Details

how to bind combobox at runtime

Asked by devdept in Microsoft Visual Basic.Net, .NET

Tags: microsoft, vb.net, 2005, combo box bindings at runtime

like the web application bindings i need same senario in windows application also.
please see the below code for web application dropdown list.

Sub BindListbox(ByVal tsqlstring As String, ByVal DDlListbox As DropDownList, ByVal DMember As String, ByVal DTextField As String, ByVal DValuefield As String)
        Dim dbConn As OleDbConnection
        Dim selectCommandZones As OleDbCommand
        Dim Dr As OleDbDataReader
        Dim sqlString As String
        sqlString = tsqlstring
        dbConn = New OleDbConnection(ConnString)
        dbConn.Open()
        selectCommandZones = New OleDbCommand(sqlString, dbConn)
        Dr = selectCommandZones.ExecuteReader()
        DDlListbox.DataSource = Dr
        DDlListbox.DataMember = DMember
        DDlListbox.DataTextField = DTextField
        DDlListbox.DataValueField = DValuefield
        DDlListbox.DataBind()
        dbConn.Close()
    End SubStart Free Trial
[+][-]05.07.2008 at 12:12AM PDT, ID: 21513758

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.07.2008 at 12:27AM PDT, ID: 21513820

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.07.2008 at 12:29AM PDT, ID: 21513832

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.07.2008 at 12:30AM PDT, ID: 21513841

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.07.2008 at 12:32AM PDT, ID: 21513848

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.07.2008 at 12:51AM PDT, ID: 21513956

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.07.2008 at 12:52AM PDT, ID: 21513962

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.07.2008 at 12:54AM PDT, ID: 21513977

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.09.2008 at 08:47AM PDT, ID: 21534050

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.09.2008 at 10:14PM PDT, ID: 21537928

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.09.2008 at 11:28PM PDT, ID: 21538031

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, .NET
Tags: microsoft, vb.net, 2005, combo box bindings at runtime
Sign Up Now!
Solution Provided By: jpaulino
Participating Experts: 2
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628