Click here to Skip to main content
15,887,214 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Excel view to datagridview migration Pin
Richard MacCutchan26-May-16 21:18
mveRichard MacCutchan26-May-16 21:18 
GeneralRe: Excel view to datagridview migration Pin
Member 476123426-May-16 22:19
Member 476123426-May-16 22:19 
GeneralRe: Excel view to datagridview migration Pin
Member 476123426-May-16 22:19
Member 476123426-May-16 22:19 
GeneralRe: Excel view to datagridview migration Pin
Richard MacCutchan26-May-16 22:52
mveRichard MacCutchan26-May-16 22:52 
QuestionWHERE clause of SELECT command Pin
Raabi Anony25-May-16 21:11
Raabi Anony25-May-16 21:11 
AnswerRe: WHERE clause of SELECT command Pin
Raabi Anony25-May-16 21:19
Raabi Anony25-May-16 21:19 
GeneralRe: WHERE clause of SELECT command Pin
Richard Deeming26-May-16 2:03
mveRichard Deeming26-May-16 2:03 
QuestionHow to populate data in combobox gridview in VB.net? Pin
kishore-201625-May-16 11:32
kishore-201625-May-16 11:32 
I have gridview with 4 columns(Request_id,Allocate_id,number_plate,name)
I have to populate data from sql server table in number_plate which is columntype DataGridViewComboBoxColumn.
i have written below code:

Private Sub pop_num_DGV()
Dim conn As New SqlConnection
Dim cmd As New SqlCommand
Dim cbn As DataGridViewComboBoxColumn = DirectCast(dgvtarget.Columns(2), DataGridViewComboBoxColumn)


conn = GetConnect()
conn.Open()
cmd.Connection = conn
Try
cmd.CommandText = "select distinct number_plate from tbVehicle where status='Available'"
Dim Adpt As New SqlDataAdapter(cmd.CommandText, conn)
Dim ds As New DataSet()

cbn.DataSource = ds.Tables("tbVehicle")
cbn.HeaderText = "Number_Plate"
cbn.DataPropertyName = "Number_Plate"
cbn.DisplayMember = "Number_Plate"
cbn.ValueMember = "Number_Plate"


Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub

But still data is not populating in gridview combobox.
kindly help this on priority.Its urgent for me.
AnswerRe: How to populate data in combobox gridview in VB.net? Pin
Richard MacCutchan25-May-16 21:03
mveRichard MacCutchan25-May-16 21:03 
GeneralRe: How to populate data in combobox gridview in VB.net? Pin
kishore-20165-Jun-16 10:20
kishore-20165-Jun-16 10:20 
GeneralRe: How to populate data in combobox gridview in VB.net? Pin
Richard MacCutchan5-Jun-16 21:24
mveRichard MacCutchan5-Jun-16 21:24 
QuestionDGV with multiple Tables Pin
Raabi Anony23-May-16 17:41
Raabi Anony23-May-16 17:41 
AnswerRe: DGV with multiple Tables Pin
Mycroft Holmes23-May-16 19:53
professionalMycroft Holmes23-May-16 19:53 
SuggestionRe: DGV with multiple Tables Pin
Richard Deeming24-May-16 1:34
mveRichard Deeming24-May-16 1:34 
GeneralRe: DGV with multiple Tables Pin
Mycroft Holmes24-May-16 12:38
professionalMycroft Holmes24-May-16 12:38 
AnswerRe: DGV with multiple Tables Pin
Richard Deeming24-May-16 1:41
mveRichard Deeming24-May-16 1:41 
GeneralRe: DGV with multiple Tables Pin
Raabi Anony24-May-16 16:06
Raabi Anony24-May-16 16:06 
GeneralRe: DGV with multiple Tables Pin
Raabi Anony25-May-16 0:41
Raabi Anony25-May-16 0:41 
GeneralRe: DGV with multiple Tables Pin
Richard Deeming25-May-16 0:55
mveRichard Deeming25-May-16 0:55 
QuestionString or Binary Data Would be Truncated. The Statement has been Terminated Pin
kishore-201622-May-16 7:35
kishore-201622-May-16 7:35 
AnswerRe: String or Binary Data Would be Truncated. The Statement has been Terminated Pin
Sascha Lefèvre22-May-16 12:19
professionalSascha Lefèvre22-May-16 12:19 
QuestionRe: String or Binary Data Would be Truncated. The Statement has been Terminated Pin
Richard MacCutchan22-May-16 21:05
mveRichard MacCutchan22-May-16 21:05 
SuggestionRe: String or Binary Data Would be Truncated. The Statement has been Terminated Pin
Richard Deeming23-May-16 1:52
mveRichard Deeming23-May-16 1:52 
AnswerRe: String or Binary Data Would be Truncated. The Statement has been Terminated Pin
Member 1256155913-Jun-16 5:23
Member 1256155913-Jun-16 5:23 
QuestionHow we can retrieve Gridvalue Pin
MANISHA SONAWANE19-May-16 20:05
MANISHA SONAWANE19-May-16 20:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.