Data from datagrid to textbox in another form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • renelima
    New Member
    • Apr 2012
    • 1

    Data from datagrid to textbox in another form

    How do I order the value of the selected cell in a datagrid to textbox in another form
  • RhysW
    New Member
    • Mar 2012
    • 70

    #2
    Code:
    textbox1.text = formname.datagridname.selectedcells[0].value
    this goes on the form where the textbox is, the datagrid modifier would have to be public not private for this to work. Fill in the blanks as you need

    (selectedcells[] is an array of all the selected cells, 0 being the very first one in the array, im assuming this is the one you want to use, else change the number 0 to its relevant position remembering that the array is zero-based)

    Comment

    Working...