title: HOW TO: Change datagridview LinkColumn Text when clicked
body: <p>I'm having a problem in my <code>DataGridViewLinkColumn</code>. When specific <code>columnIndex</code> clicked, I want to change the link column text. <em>(please see example below)</em>
  <img src="https://i.stack.imgur.com/qUwrU.png" alt="enter image description here"></p>
  
  <p>In example above, I want to change the text(the highlighted one) that is clicked to <strong>SAVE</strong>.<br>
  <em>NOTE: the changing must be done only in specific row and column index</em></p>
  
  <p>I used <code>datagridViewColumn</code> and here's my code: (link column displays when bind in datatable then display to datagrid.)</p>
  
  <pre><code>        Dim da As New SqlDataAdapter("SELECT DateReq AS [Date Requested],NoHrs AS [# OT Hrs.],status,approved_by FROM tableName" _
              &amp; "WHERE requested_by='" &amp; lbluserid.Text &amp; "'" _
              &amp; " ORDER BY date_request ASC", Constr)
          Dim dt As New DataTable
  
          ds.Clear()
          da.Fill(dt)
  
  
          dg.DataSource = dt
  
          dg.Columns.Add(lnkEdit)
          lnkEdit.HeaderText = ""
          lnkEdit.Name = "edit"
          lnkEdit.Text = "Edit"
          lnkEdit.UseColumnTextForLinkValue = True
          dg.Columns(4).Width = 45
          dg.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopCenter
  
          dg.Columns.Add(lnkCancel)
          lnkCancel.HeaderText = ""
          lnkCancel.Name = "cancel"
          lnkCancel.Text = "Cancel"
          lnkCancel.UseColumnTextForLinkValue = True
          dg.Columns(5).Width = 45
          dg.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopCenter
  </code></pre>