Hi I am new to VB platform, Can any one help me to understand the last few lines of code, here I highlight with bold at last, which is not understand or confusing to me. What does that Display member and value number do?
.. cmbcust is the combobox...
Where customer table are having following field.
**Customer_sname** **Customer_code** **Customer_fname**
nokia 1 nokia corp.
samsung 2 samsung corp.
sony 3 sony corp.
Micromax 4 Micromax India corp.
passing custval is nokia, samsung, sony
Public Function customfunc(ByVal custval As String) As DataSet
Try
Dim strSQL As String = "select * from customer where cust_sname in (" & custval & ")"
If Conn.State = ConnectionState.Open Then Conn.Close()
Conn.Open()
Dim Adap As New SqlDataAdapter(strSQL, Conn)
Dim Ds As New DataSet
Adap.Fill(Ds, "customer")
ReadINICustomers = Ds
Catch EXP As Exception
MsgBox("Error Connecting to Server :" & EXP.Message, MsgBoxStyle.Critical)
End Try
End Function
Public Sub Fillcustomer()
Dim Lstcust() As String
Dim Lstcust1 As String
Lstcust1 = ""
Lstcust1 = custINIval
Dim Ds As New DataSet
Ds = objData.ReadINICustomers(Lstcust1)
cmbcust.DataSource = Ds.Tables("customer")
cmbcust.DisplayMember = Ds.Tables("customer").Columns.Item("cust_sname").ToString().Trim()
cmbcust.ValueMember = Ds.Tables("customer").Columns.Item("cust_code").ToString().Trim()
End Sub
cmbcust.DisplayMember = Ds.Tables("customer").Columns.Item("cust_sname").ToString().Trim() cmbcust.ValueMember = Ds.Tables("customer").Columns.Item("cust_code").ToString().Trim()