Congratulations to all monthly winners of May 2013 !!! They have won INR 2900 cash and INR 27497 worth prize.
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 32730 |  Welcome, Guest!   Register  Login
  Home > Community Home >

Dynamically set Template column Visibility

 Author: akhilrajau | Posted on: 6/9/2008 12:24:01 AM | Views: 88

Recommend an Articles | Recommended Articles | Search Resources | Community Home |


Advertisements


hi friends,
I am working in grid view now and my problem is i want to display the template column dynamically.
Means if session value is 1 i want to visible that column otherwise not.
I did it in the followiing way
<asp:GridView ID="grd" runat="server" AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false" DataKeyNames="ID">
 <Columns>
            <asp:BoundField ReadOnly="true" HeaderText="Name" DataField="Name" />
           <asp:TemplateField HeaderText="Relieved On" Visible='<%#GetVisible() %>'>
            <ItemTemplate>
                <asp:Label ID ... Go to the complete details ...

Found interesting? Add this to:


About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 6/19/2013 7:18:43 AM