none
fill up the row/column of a datagridview RRS feed

  • Question

  • hello guys please help me, i want to fill up the rows in my datagridview

    ex: this is my datagridview

    id         Number             Name              Date

    1                                                     10/03/2018

    2                                                     11/03/2018

    3                                                     12/03/2018

    what i want to do is to fill up the first row that has "id" = 1 and column name "Number" and Column name "Name" Using Textbox and after that i can also fill up the second column


    Monday, December 3, 2018 7:51 AM

Answers

  • hello guys please help me, i want to fill up the rows in my datagridview

    ex: this is my datagridview

    id         Number             Name              Date

    1                                                     10/03/2018

    2                                                     11/03/2018

    3                                                     12/03/2018

    what i want to do is to fill up the first row that has "id" = 1 and column name "Number" and Column name "Name" Using Textbox and after that i can also fill up the second column


    Hi

    To update on a row bynrow single row:

    Set the variable 'row' to row index (0-based) and add the required values.

    The probable best way to do this is to build a Sub with input parameters of row, Number and Name and call the Sub accordingly.

        Dim row As Integer = 0
    
        DataGridView1("Number", row).Value = 1234
        DataGridView1("Name", row).Value = "John"
    


    Regards Les, Livingston, Scotland

    Monday, December 3, 2018 1:17 PM

All replies


  • what i want to do is to fill up the first row that has "id" = 1 and column name "Number" and Column name "Name" Using Textbox and after that i can also fill up the second column


    Hi,

    What is your order of filling up?Do you fill up the first row and then fill up the second column?

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, December 3, 2018 8:55 AM
  • hello guys please help me, i want to fill up the rows in my datagridview

    ex: this is my datagridview

    id         Number             Name              Date

    1                                                     10/03/2018

    2                                                     11/03/2018

    3                                                     12/03/2018

    what i want to do is to fill up the first row that has "id" = 1 and column name "Number" and Column name "Name" Using Textbox and after that i can also fill up the second column


    Hi

    To update on a row bynrow single row:

    Set the variable 'row' to row index (0-based) and add the required values.

    The probable best way to do this is to build a Sub with input parameters of row, Number and Name and call the Sub accordingly.

        Dim row As Integer = 0
    
        DataGridView1("Number", row).Value = 1234
        DataGridView1("Name", row).Value = "John"
    


    Regards Les, Livingston, Scotland

    Monday, December 3, 2018 1:17 PM