add values from datagridview to textbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • buterfly0707
    New Member
    • Nov 2009
    • 30

    add values from datagridview to textbox

    i want to get multiple values from datagridview to same textbox and i want to seperate those values from commas. and my datagridview in one form and the textbox in another form.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    What have you tried so far, this could be a fairly simple process.

    Comment

    • buterfly0707
      New Member
      • Nov 2009
      • 30

      #3
      i have created the datagridview in one form and textboxes in another form. and i wrote code for add one value from DGV to textbox. but my problem is i don't know how to get more than one value to the same textbox from the DGV column..

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        That should have been the easiest part?
        [code=c#]
        string myval="";
        myval+=dataGrid ViewRow.Cells["SomeColumn "].Value.ToString ();
        myval+=dataGrid ViewRow.Cells["SomeOtherColum n"].Value.ToString ();
        //now send string over to textbox
        [/code]

        Comment

        Working...