Reputation: 1
hii
I have 2 gridviews they are bind by sqldatasource ,it contains Id , Name and Price
i dont want to show ID coloumn when page is loaded.How to hide it?
Upvotes: 0
Views: 3442
Reputation: 765
You can also hide the column from the code where you feel like.
this.DataGridView1.Columns["ID coloumn"].Visible = false;
Regards.
Upvotes: 0
Reputation: 1295
protected void gvDocuments_RowDataBound(object sender, GridViewRowEventArgs e)
{
e.Row.Cells[1].Visible = false;
}
Upvotes: 1