How do I add a timestamp to a gridview

前端 未结 3 1032
耶瑟儿~
耶瑟儿~ 2021-01-27 20:00

How do I add a timestamp to a gridview that shows the last time a row was edited? I\'ve been searching Google but haven\'t found anything helpful yet.

I tried to create

3条回答
  •  情深已故
    2021-01-27 20:36

    DataGridView.CellValueChanged Event:
    https://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellvaluechanged%28v=vs.110%29.aspx

    private void MyDataGridView_CellValueChanged(object sender, DataGridViewCellEventArgs e)  
    {
        DataGridViewRow changedRow = myDataGridView.Rows[e.RowIndex];
    }
    

提交回复
热议问题