Click here to Skip to main content
15,889,867 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: PowerPoint Application Pin
JR21221-Jun-10 3:36
JR21221-Jun-10 3:36 
Questionnewbie question on updating Access mdb tables Pin
john12617-Jun-10 5:46
john12617-Jun-10 5:46 
QuestionRe: newbie question on updating Access mdb tables Pin
DaveAuld17-Jun-10 6:26
professionalDaveAuld17-Jun-10 6:26 
QuestionRe: newbie question on updating Access mdb tables Pin
john12617-Jun-10 6:36
john12617-Jun-10 6:36 
AnswerRe: newbie question on updating Access mdb tables [modified] PinPopular
AnnieMacD17-Jun-10 7:24
AnnieMacD17-Jun-10 7:24 
GeneralRe: newbie question on updating Access mdb tables Pin
john12617-Jun-10 8:49
john12617-Jun-10 8:49 
GeneralRe: newbie question on updating Access mdb tables Pin
AnnieMacD17-Jun-10 11:26
AnnieMacD17-Jun-10 11:26 
QuestionAdd Combobox to Datagridview at runtime. Pin
Nielvh17-Jun-10 4:35
Nielvh17-Jun-10 4:35 
Hi All,
I am trying to add a dropdown to a column in a datagridview. Below is the code I use to populate the Datagridview.
Can I just add something to this to make 2nd and 3rd column have a dropdown or do I need to take a completely different aproach to achieve this.
The data for the dropdown will be the same for each row and will be extracted from an existing table.

Any help would be greatly appreciated.

I am using VS2005.

Private Sub FillBinDataGrid()
        Dim SqlBin As String = _
                    "SELECT zz_ST_Binsheets.iStockLink, zz_ST_Binsheets.iBinSheetLine, " _
                    & "StkItem.Code, StkItem.Description_1, " _
                    & "zz_ST_Binsheets.iPacksize, zz_ST_Binsheets.fQuantity " _
                    & "FROM zz_ST_Binsheets LEFT JOIN " _
                    & "StkItem ON zz_ST_Binsheets.iStockLink = StkItem.StockLink " _
                    & "WHERE zz_ST_Binsheets.iBinSheetNr = @binnr "
        Dim Sqlparam As SqlClient.SqlParameter
        Sqlparam = New SqlClient.SqlParameter("@binnr", SqlDbType.Int)
        Sqlparam.Value = BsBinNrTextbox.Text

        Dim Conn As New SqlConnection(CntString)
        Conn.Open()
        Dim MyCommand As New SqlCommand(SqlBin, Conn)
        MyCommand.Parameters.Add(Sqlparam)
        Dim adapter As New SqlDataAdapter(MyCommand)
        Dim dtset As New DataSet
        adapter.Fill(dtset)
        adapter.Dispose()
        Conn.Close()
        Dim table As DataTable = dtset.Tables(0)
        With Me.BsDataGridView
            .DataSource = table
            .AutoResizeColumns()
            .Columns(0).Visible = False
        End With
    
    End Sub

AnswerRe: Add Combobox to Datagridview at runtime. Pin
dan!sh 17-Jun-10 5:43
professional dan!sh 17-Jun-10 5:43 
GeneralRe: Add Combobox to Datagridview at runtime. Pin
Nielvh18-Jun-10 11:18
Nielvh18-Jun-10 11:18 
QuestionPassing Events Pin
Sonhospa17-Jun-10 3:11
Sonhospa17-Jun-10 3:11 
AnswerRe: Passing Events Pin
EliottA17-Jun-10 3:49
EliottA17-Jun-10 3:49 
NewsRe: Passing Events Pin
Sonhospa17-Jun-10 5:03
Sonhospa17-Jun-10 5:03 
QuestionRe: Passing Events Pin
DaveAuld17-Jun-10 3:58
professionalDaveAuld17-Jun-10 3:58 
NewsRe: Passing Events Pin
Sonhospa17-Jun-10 5:17
Sonhospa17-Jun-10 5:17 
GeneralRe: Passing Events Pin
DaveAuld17-Jun-10 5:53
professionalDaveAuld17-Jun-10 5:53 
GeneralRe: Passing Events Pin
Sonhospa17-Jun-10 6:17
Sonhospa17-Jun-10 6:17 
NewsResolved: Passing Events Pin
Sonhospa17-Jun-10 7:33
Sonhospa17-Jun-10 7:33 
GeneralRe: Resolved: Passing Events Pin
DaveAuld17-Jun-10 7:43
professionalDaveAuld17-Jun-10 7:43 
QuestionVisStudio 2005 (VB) to VS 2008/2010 migration errors exit function without message Pin
QuickBooksDev17-Jun-10 1:56
QuickBooksDev17-Jun-10 1:56 
AnswerRe: VisStudio 2005 (VB) to VS 2008/2010 migration errors exit function without message Pin
Luc Pattyn17-Jun-10 2:19
sitebuilderLuc Pattyn17-Jun-10 2:19 
GeneralRe: VisStudio 2005 (VB) to VS 2008/2010 migration errors exit function without message Pin
QuickBooksDev19-Jun-10 2:14
QuickBooksDev19-Jun-10 2:14 
AnswerRe: VisStudio 2005 (VB) to VS 2008/2010 migration errors exit function without message Pin
AnnieMacD17-Jun-10 2:46
AnnieMacD17-Jun-10 2:46 
GeneralRe: VisStudio 2005 (VB) to VS 2008/2010 migration errors exit function without message Pin
QuickBooksDev19-Jun-10 2:11
QuickBooksDev19-Jun-10 2:11 
GeneralRe: VisStudio 2005 (VB) to VS 2008/2010 migration errors exit function without message Pin
AnnieMacD19-Jun-10 2:35
AnnieMacD19-Jun-10 2:35 

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.