CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    May 2012
    Posts
    2

    Question Please help with datagridview

    Hi,

    I'm totally beginer (noob) in programmers world, I'm trying to prepare my first program (database). I'm creating it just acording to my knownledge so it's a little bit cr..

    in form1 I've 3 comboboxes (CB) 3datagridviews(DGV) and some textboxes (TB)

    all DGV are connected to a diffrent database files..
    CB1 list values from DGV1; CB2 from DGV2 etc

    'CB1.DisplayMember = "Column3"
    CB1.DataSource = dBaseDT

    when I'm choosing the value from CB1 then values in CB2 and CB3 are changing to the same value. then in all DGV is sellected row with value choosen in CB1 (if present).
    '
    CB2.Text = CB1.Text



    Now I would like to copy the text from specific colum of choosen row in DGV1 to TB1... but only part of the text..
    I'm using this

    'Dim mm As String
    'TB1.DataBindings.Clear()
    'TextBox1.DataBindings.Add("TEXT", dBaseDT, "Column10")
    'mm = TB1.Text
    'TB1.DataBindings.Clear()
    'TB1.Text = Microsoft.VisualBasic.Right(mm, 3)

    unfortunately when I make simple databinding without cutting the text it shows me value from actual sellected row but wen I'm using Microsoft.VisualBasic.Right it shows me the cutted part from previous choose.

    Please teach me how to fix it??

    Thanks
    Mic
    Last edited by Mic13; May 22nd, 2012 at 02:24 PM. Reason: accidentialy created 2 post for the same thema

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured