delet data
-
how to delete data from colum in datagridview i want a clum empty
-
how to delete data from colum in datagridview i want a clum empty
-
how to delete data from colum in datagridview i want a clum empty
To clear data from each cell of a column of DataGridView, there is no method in DataGridViewColumn class. A method like the following can be used to clear all the cells of a column
Public Sub ClearColumn(column As DataGridViewColumn)
For Each row As DataGridViewRow In column.DataGridView.Rows
row.Cells(column.Index).Value = Nothing
Next
End Sub -
how to delete data from colum in datagridview i want a clum empty
In the
RowDataBoundEvent
, set the value of that cell to empty.potected void grid_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
DataRowView drView = (DataRowView)e.Row.DataItem;
DataRow drRow = drView.Row;e.Row.Cells[7].Value = string.empty;
}
}