how to retrieve values from datagrid ?
-
i have a datagrid whose datasource is a datatable now, i want to retrive the values of a particular cell of a datagrid. how can i do this also i want to increment the position of currentrow by 1 how can i do it sumit
For accessing values use the indexer of the grid:
Dim o As Object = myGrid(rowIndex, columnIndex)
For incrementing:
myGrid.CurrentRowIndex += 1
-
For accessing values use the indexer of the grid:
Dim o As Object = myGrid(rowIndex, columnIndex)
For incrementing:
myGrid.CurrentRowIndex += 1
i want to retrieve the text written at the cell how to use "dim o as object" to get the text also, can i make datagrid editable, so that user can write into it. i basically want to do a insert operation i have adatatable showing the table on my database db1.mdb now i want that if user wants to insert a row , he simply types the values in the next row and pressses button "btn_insert". at click event of this event i want to insert the row which user had entered in the datagrid plz help