Step (1)

Suppose you have a bound field namely UNIQUEID that you don't want to be displayed then you just apply the following properties to your bound field.

<asp:BoundField DataField="UNIQUEID" HeaderText="Unique id" ItemStyle-CssClass="MakeHidden" HeaderStyle-CssClass="MakeHidden">
<HeaderStyle CssClass="MakeHidden"></HeaderStyle>

<ItemStyle CssClass="MakeHidden"></ItemStyle>
</asp:BoundField>

Step (2)

Then add the following css

.MakeHidden
{
display:none;
}

6 Comments

Join the conversation! Your thoughts help the community grow.

  • Vithal Wadje

    Dear Rishikesh Kumar Singh any member who post 500 or 1000 articles not thinking good them self,just i am trying to say maintaining the community clean make member good,this is sample trick not fit in a blog definition..post it on trick section,defiantly you and your contribution will become good

  • how to hide the column ingridview by using javascript

  • Rishikesh Kumar  Singh

    Hello Vithal Wadje sir, firstly i would like to thank you for reading my blogs. i know this is a simple trick but it may be helpful for the beginners.I have learnt a lot from this site.if even a single person is getting benefited by even my single blog post then i will be think of myself a good member of this C-sharpcorner.com family.

  • Vithal Wadje

    i dont know ? why this blog is approved..? this is a one simple trick..

  • Mahesh Chand

    Please format your blog. Here are the steps. Copy your contents from Word to Notepad, Copy from Notepad to Blog online editor and then format. Do not use any colors. It is not recommended. Thank you for keeping community clean!