Edit grid cells in VB

  • Thread starter Thread starter John Wright
  • Start date Start date
J

John Wright

I have a datagridview control that I have added 5 columns to. I bind the
datagrid to a datatable that I get from another function. Once of the rows
returned from the function is an empty field that I would like the user to
edit the value (which is empty to begin with) and add their own value. I
have the grid bound just fine, and I have enabled editing on the grid, but I
can't get the grid to edit the cells. My plan would be to transverse the
grid and check for values in that column. If there are values and they are
different from another column, I want to call another function to update the
data. Am I missing something? Do I have to use a dataset instead of a
table? Thanks.


Here is the code I have right now for binding.

Dim dtTmp As New DataTable

dtTmp = GetRunswithLocation(txtRunLocationRunNumber.Text)

'Fill the grid with the results

dgRunLocationRuns.DataSource = dtTmp
 
Perhaps I can take another route. It would be best if I had this column be
dropdown list of preselected values. If the values have changed, then do
the update. How could I populate the dropdown and how do I do a check for a
value change?

John
 
Back
Top