Hi All!

I am new to Vb.net & ado programming so this really just for educational purpose.

basically i have a form with a datagrid set to readonly. i have 5 textboxs.
when a cell is clicked its value in the row is output to the following textboxs on the form
As the datagrid is set to readonly i want a user to be able to update table/ dataset via the data enter using the textbox, then to be re-fill the datagrid with updated data.....If that makes sense.

i have tried looking many examples that date back from 2006 to 2008, has there been any change in .net framework that can make this similar.

If you could maybe point me in the right direction or you have some code that you dont mind sharing, i would appreciate muchly.

Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles maingrid.CellClick
        Dim i As Integer

        i = maingrid.CurrentRow.Index

        Me.cmbcompany.Text = maingrid.Item(2, i).Value
        Me.cmbcontract.Text = maingrid.Item(5, i).Value
        Me.cmbjob.Text = maingrid.Item(1, i).Value
        Me.cmbunitid.Text = maingrid.Item(0, i).Value
        Me.txtjobtotal.Text = maingrid.Item(6, i).Value
        Me.txtworkdetails.Text = maingrid.Item(3, i).Value
        
    End Sub

I'm confused: is there something about your code that doesn't work?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.