How can we disable a cell of datagrid in and how to show date in datagrid cell in

Recommended Answers

All 3 Replies

What exactly you mean by disable a cell of datagrid ? Are you trying to make it read only ?

Yes, the user should not be able to edit the value of the cell and also i want to show date in one cell.

Here is the solution i have resolve it

Private Sub dataGridView1_CellClick(ByVal sender As Object, _
    ByVal e As DataGridViewCellEventArgs) _
    Handles DataGridView1.CellClick

        DataGridView1.CurrentRow.Cells(0).ReadOnly = True
        DataGridView1.CurrentRow.Cells(7).Value = Now
    End Sub
Be a part of the DaniWeb community

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