C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

Change gridview header text


Posted Date: 25 May 2009      Posted By: vani ch      Member Level: Bronze     Points: 1   Responses: 2



hi,
i have a gridview having student name,rollnumber and subject names as columns.
before i have a selected list of examtimetable.if i select Examtimetable,then the subject names will change in the gridview header text.according to that i will display the subject marks in gridview.





Responses

Author: Syed Shakeer Hussain     25 May 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Hi
first display all columns in gridview
based on condition make column names visible =true or false
grdivew1.cloumn[0].Visible=false means it first column wii be false)invisible)


Thanks & Regards!
Syed Shakeer Hussain



Author: D.Jeya kumar(JK)    25 May 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Hi,


You can use the Headertext property of the Grid. check the below sample code to change the Header text of a Grid column



//the below code will change the Header text of the first column which is in the grid. modify the Index 0 to 1 to modify the 2nd column text
Grv.Columns[0].HeaderText="test"



Regards
JK



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : How to use auto edit update cancel in gridview
Previous : How to save data in itemcommand of repeater
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use