Click here to Skip to main content
15,888,461 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: 3d animation Pin
Otekpo Emmanuel13-Nov-14 23:26
Otekpo Emmanuel13-Nov-14 23:26 
GeneralRe: 3d animation Pin
Richard MacCutchan13-Nov-14 23:34
mveRichard MacCutchan13-Nov-14 23:34 
GeneralRe: 3d animation Pin
Otekpo Emmanuel13-Nov-14 23:44
Otekpo Emmanuel13-Nov-14 23:44 
QuestionI Need Some Help In Visual Basic - msflexgrid Pin
akmckd13-Nov-14 19:04
akmckd13-Nov-14 19:04 
AnswerRe: I Need Some Help In Visual Basic - msflexgrid Pin
Mycroft Holmes13-Nov-14 20:09
professionalMycroft Holmes13-Nov-14 20:09 
AnswerRe: I Need Some Help In Visual Basic - msflexgrid Pin
Bernhard Hiller13-Nov-14 20:56
Bernhard Hiller13-Nov-14 20:56 
AnswerRe: I Need Some Help In Visual Basic - msflexgrid Pin
Richard MacCutchan13-Nov-14 22:07
mveRichard MacCutchan13-Nov-14 22:07 
QuestionSync textbox movement with grid display view movement Pin
josephls13-Nov-14 7:52
josephls13-Nov-14 7:52 
Please be gentle, my first post. I am new at vb.net and am need help syncing my textbox and data grid so that when I move to the next record in the textbox the grid view also moves to the new row. Listed is my code, help would be greatly appreciated.

Private Sub OpenDataGrid()
        Dim sql As String
        '********************* Populate DataGrid *********************
        Try
            sql = "SELECT * FROM TempCreditors;"
            MyConn = New OleDbConnection
            MyConn.ConnectionString = connString
            ds = New DataSet
            tables = ds.Tables
            da = New OleDbDataAdapter(sql, MyConn)
            cm = New OleDbCommand(sql)
            da.TableMappings.Add("MyTables", "MyTables")
            da.FillSchema(ds, SchemaType.Source, "TempCreditors")

            da.Fill(ds, "TempCreditors")
            Dim view As New DataView(tables("TempCreditors"))
            grdDisplay.DataSource = ds
            grdDisplay.DataMember = ds.Tables("TempCreditors").TableName
        Catch ex As Exception
            MessageBox.Show("Unable to connect to database, or an error occurred.")
        End Try

        '********************* End Populate DataGrid ******************

        Binding_Source.DataSource = ds    'grdDisplay.DataSource
        Binding_Source.DataMember = ds.Tables("TempCreditors").TableName  'grdDisplay.DataMember

        'Bind Form's Textboxes
        txtCreditor.DataBindings.Add("text", Binding_Source, "Creditor", False)
        txtAmount.DataBindings.Add("Text", Binding_Source, "Amount", False)
        txtAmtPaid.DataBindings.Add("Text", Binding_Source, "Amt Paid", False)
        txtRemBal.DataBindings.Add("Text", Binding_Source, "Rem Bal", False)


        'Right Align GridView text
        grdDisplay.Columns("Amount").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
        grdDisplay.Columns("Amt Paid").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
        grdDisplay.Columns("Rem Bal").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight

        With grdDisplay
            'Set Column Properties
            .Width = 610
            .Columns("Creditor").Width = 250
            .Columns("Amount").DefaultCellStyle.Format = "c"
            .Columns("Amt Paid").DefaultCellStyle.Format = "c"
            .Columns("Rem Bal").DefaultCellStyle.Format = "c"

            'Hide Columns
            .Columns("ID").Visible = False
            .Columns("Due Date").Visible = False
            .Columns("Paid").Visible = False
            .Columns("Mid Month").Visible = False
            .Columns("End Month").Visible = False
            .Columns("Due Month").Visible = False
            '           .Columns("Rem Bal").Visible = False
            .Columns("Pay Date").Visible = False
            .Columns("Deduction").Visible = False
        End With

        'Bind Grid to Nav buttons
        MyCM = CType(BindingContext(Binding_Source), CurrencyManager)
        MyCM.Position = 0
        '        grdDisplay.Rows(0).Selected = True
    End Sub

JLS

AnswerRe: Sync textbox movement with grid display view movement Pin
Eddy Vluggen14-Nov-14 8:27
professionalEddy Vluggen14-Nov-14 8:27 
Questionvb.net Pin
kusuma.d13-Nov-14 0:53
kusuma.d13-Nov-14 0:53 
AnswerRe: vb.net Pin
Dave Kreskowiak13-Nov-14 2:14
mveDave Kreskowiak13-Nov-14 2:14 
AnswerRe: vb.net Pin
Richard MacCutchan13-Nov-14 2:54
mveRichard MacCutchan13-Nov-14 2:54 
AnswerRe: vb.net Pin
Sheepings13-Nov-14 4:34
professionalSheepings13-Nov-14 4:34 
QuestionI am just starting and need direction Pin
Member 1122645911-Nov-14 19:33
Member 1122645911-Nov-14 19:33 
AnswerRe: I am just starting and need direction Pin
Chris Quinn11-Nov-14 21:06
Chris Quinn11-Nov-14 21:06 
GeneralRe: I am just starting and need direction Pin
Member 1122645912-Nov-14 22:28
Member 1122645912-Nov-14 22:28 
AnswerRe: I am just starting and need direction Pin
Richard MacCutchan11-Nov-14 21:07
mveRichard MacCutchan11-Nov-14 21:07 
GeneralRe: I am just starting and need direction Pin
Member 1122645912-Nov-14 22:29
Member 1122645912-Nov-14 22:29 
AnswerRe: I am just starting and need direction Pin
Mycroft Holmes11-Nov-14 21:43
professionalMycroft Holmes11-Nov-14 21:43 
GeneralRe: I am just starting and need direction Pin
Member 1122645912-Nov-14 22:27
Member 1122645912-Nov-14 22:27 
GeneralRe: I am just starting and need direction Pin
Mycroft Holmes12-Nov-14 22:35
professionalMycroft Holmes12-Nov-14 22:35 
GeneralRe: I am just starting and need direction Pin
Member 1122645913-Nov-14 22:17
Member 1122645913-Nov-14 22:17 
GeneralRe: I am just starting and need direction Pin
Member 1122645913-Nov-14 22:22
Member 1122645913-Nov-14 22:22 
QuestionHow to Set Allow Zero Length for Field using OLEDBCommand Pin
gwittlock11-Nov-14 7:35
gwittlock11-Nov-14 7:35 
AnswerRe: How to Set Allow Zero Length for Field using OLEDBCommand Pin
Matt U.11-Nov-14 7:48
Matt U.11-Nov-14 7:48 

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.