Home > How To > How To Change The Column Header Text In Gridview At Runtime In Asp.net

How To Change The Column Header Text In Gridview At Runtime In Asp.net

Collection of .NET Framework and Visual Studio Posters Here is a collection of .NET Framework and Visual Studio Posters available for free. When answering a question please: Read the question carefully. Here's how to do it. asked 6 years ago viewed 37956 times active 3 years ago Blog Stack Overflow Podcast #97 - Where did you get that hat?! have a peek here

share|improve this answer answered Sep 21 '10 at 8:26 Brissles 3,2251527 check it ... roy himanshu 0 126 0 how to change the column header text in gridview at run time in C#? Select AutoFill" style="WIDTH: 50px; BACKGROUND-COLOR: #ffffa0" name=gv1$ctl03$TextBox2>

October 12, 2012 at 9:05 AM Suprotim Agarwal said... How are you binding data to the grid? –Malice Oct 22 '12 at 14:13 why not change the column name using AS keyword while retrieving data from SQL? –Karthik And to a column i need to display header text dynamically from code behind while binding the values to grid view[It is during page load itself].i used code something like this:

All contents are copyright of their authors. What does GridView.DataKeys.Count result to? Term describing a zone subject to speeding ¿Qué término se usa en español para "Game Changer"? Reply lconley Member 10 Points 268 Posts Re: change header text of col in gridview at runtime Oct 31, 2007 12:47 PM|lconley|LINK I have steped though the code it hits the

We appreciate your feedback. Hi,I created a custom panel, it contains gridview.In design time grid is not displaying but run time its working fine. Cont... http://www.codeproject.com/Questions/660812/Dynamically-Change-Gridview-column-headertext-in-v Privacy Statement| Terms of Use| Contact Us| Advertise With Us| CMS by Umbraco| Hosted on Microsoft Azure Feedback on ASP.NET| File Bugs| Support Lifecycle

No new comments.

Here's a solution I have te... Dev centers Windows Office Visual Studio Microsoft Azure More... Solution 1 Accept Solution Reject Solution I worked when i changed code to Grd_View.HeaderRow.Cells(2).Text = decVal.ToString() Permalink Posted 29-Sep-13 20:55pm balu_s259 Add a Solution Add your solution here B I U Contact Us Privacy Policy Terms & Conditions About Us ©2016 C# Corner.

How can 'HD 140283' be older than the universe? http://www.c-sharpcorner.com/forums/how-to-change-the-column-header-text-in-gridview-at-run-time-in-c-sharp This code example demonstrates a master-details scenario in which a GridView control is used to display a subset of data while the DetailsView control is used to display a larger set Doing Math Research in a "non-mathematical" environment Hold osciloscope probes What is the word for "troll"? Dropbox Password security Could Hashing prevent SQL injection?

share|improve this answer answered Oct 22 '12 at 14:17 Ram Singh 3,4091967125 thanks for the link. –Sylca Oct 22 '12 at 14:43 @Sylca my pleasure to help http://analysedesgeeks.com/how-to/how-to-change-header-text-of-gridview-in-runtime.html System.Web.UI.WebControls DataControlField Class DataControlField Properties DataControlField Properties HeaderText Property HeaderText Property HeaderText Property AccessibleHeaderText Property Control Property ControlStyle Property DesignMode Property FooterStyle Property FooterText Property HeaderImageUrl Property HeaderStyle Property HeaderText Property Related Filed under .Net Tagged with .Net About linnaryonetry to be a lady who can satisfy and have a positive thinking Leave a Reply Cancel reply Enter your comment here... more hot questions question feed lang-cs about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation

Please help me out.if(rblsrcht.SelectedItem.Text=="Likely") { SqlConnection con = new SqlConnection("Data Source=SPSERVER;Initial Catalog=SuperPOS;Integrated Security=True"); string sqlstr2 = "select POS004_ITEM_ID,POS004_DESC,POS004_SALE_PRICE2,POS004_AVAIL_QTY,POS004_UNIT_QTY from POS_ITEMMST_004 where " + ddsbyprod.SelectedValue + " like '%" + tbsvprod.Text + Aug 31 2009 6:43 AM hi,all how to change thecolumn header text in gridview at run time in C#?if i change column header text its change only in front end,iam don't Join us on FaceBook Featured Contact Us ASP.NET jQuery SQL Server My Other Site About Me Contact Us Most Trending 10 Free Tools to Load/Stress Test Your Web Applications Wikipedia defines Check This Out my doubt is ur db name is usrinformation and ur dsorce is sureshdasari so wat is data source.

is it possible? Add Dynamic TextBox and Label at Runtime on DropDo... All rights reserved.

current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list.

In a previous post, we saw how to do an Inner join in C#... Learning resources Microsoft Virtual Academy Channel 9 MSDN Magazine Community Forums Blogs Codeplex Support Self support Programs BizSpark (for startups) Microsoft Imagine (for students) United States (English) Newsletter Privacy & cookies Incremental Quine What next after windows domain account has been compromised? In it, you'll get: The week's top questions and answers Important community announcements Questions that need answers see an example newsletter Linked 1 GridView1.Columns[0].HeaderText = “Text Here” Throws “Index was out

i have already tried, testGV.Columns[0].HeaderText = "Date"; or this.testGV.Columns[0].HeaderText = "Date"; does not help. About Me Copyright © 2009-2016 All Rights Reserved for DevCurry.com by Suprotim Agarwal | Terms and Conditions Powered by Blogger. Browse other questions tagged c# asp.net gridview or ask your own question. this contact form I tried to change it after Databound and in PreRender of gridview but no Success.

Your Email Password Forgot your password? Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. If a Ferengi woman is forbidden to speak with a stranger, how is she going to fall in love and meet her future husband? Not the answer you're looking for?

am not sure if its recommended –Karthik Oct 22 '12 at 14:20 oki, will try it out –Mana Oct 22 '12 at 14:21 @karthi: It's often better The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner. Newer Post Older Post Home Subscribe to: Post Comments (Atom) About Me Parthasarathi View my complete profile Code Archive ▼ 2012 (4) ▼ October (4) Bind DropDownList based on another DropDownList Are you using DataKeys anywhere.

Terms of Service Layout: fixed | fluid CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100 Blog Sign in Join ASP.NET Home Get Started Learn Hosting Downloads Thanks! Your Email This email is in use.