Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hide column in gridView

Tags:

asp.net

vb.net

i had a dataset that return the following data CategoryDI, CategoryName, CateoryPicture im displaying these data using gridview however i want to display only CategoryName hide categoryid, and CategoryPicture im uinsg the following code but it not working please help me thank you

GridView1.DataSource = getDataSet.Tables(0)

    GridView1.DataBind()

    GridView1.Columns(0).Visible = False
    GridView1.Columns(1).Visible = true
    GridView1.Columns(2).Visible = False
like image 610
Milas Avatar asked Feb 24 '23 20:02

Milas


1 Answers

 protected void gvDocuments_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            e.Row.Cells[1].Visible = false;
        }
like image 50
Mayur Borad Avatar answered Mar 06 '23 07:03

Mayur Borad