---
title: "How do you hide a column for a DataBound GridView"  
description: "The way to hide a column in a DataBound GridView is to trap the RowCreated Event and set a Cell inside the column of the row to Visible = false. Nice!"  
author: "mohan kumar"  
published: 2012-05-02  
updated: 2020-07-11  
canonical: https://www.mindstick.com/articles/933/how-do-you-hide-a-column-for-a-databound-gridview  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# How do you hide a column for a DataBound GridView

The way to hide a [column](https://www.mindstick.com/forum/2288/column-site_name-ambiguous-problem) in a DataBound [GridView](https://www.mindstick.com/articles/873/update-delete-edit-gridview-in-asp-dot-net) is to trap the RowCreated [Event](https://www.mindstick.com/articles/167719/marquee-hire-benefits-of-event-lighting-hire-london) and set a Cell inside the column of the [row](https://yourviews.mindstick.com/view/83455/pm-modi-s-uae-visit-after-prophet-row) to Visible = false. Nice!\

\

```
protected void myGrid_RowCreated(object sender, GridViewRowEventArgs e)
{
{//  hide
a cell in the column to hide column 1
  e.Row.Cells[1].Visible = false;
}
}
```

---

Original Source: https://www.mindstick.com/articles/933/how-do-you-hide-a-column-for-a-databound-gridview

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
