Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8435677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:58:41+00:00 2026-06-10T06:58:41+00:00

I placed a Placeholder server control on aspx page. create a Grid-view instance in

  • 0

I placed a Placeholder server control on aspx page.

create a Grid-view instance in code behind.

set data-source to it

Now i want to change it header text.so first i tried as given below:

GridView1.Columns[4].HeaderText = "ABC";

header text not changed.

then i tried with:

GridView1.HeaderRow.Cells[4].Text="ABC";

header text changed now.

Added GridView control to PlaceHolder server control:

plhGridView.Controls.Add(GridView1);

I want to know that why header text not changed when i tried first time?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T06:58:43+00:00Added an answer on June 10, 2026 at 6:58 am

    May be you are not binding columns with your Rows in your former code

    GridView1.Columns[4].HeaderText = "ABC";
    

    You can do this from the former code using RowDataBound handler for details use the following link:

    ASP.NET: When and how to dynamically change Gridview's headerText's in code behind?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a asp:Content tag added to my aspx page. <asp:Content ID=Step1Content ContentPlaceHolderID=MainContent Runat=Server>
My question is about accessing a server control (listbox) that is located in default.aspx.
my problem is this: i want to create a server control that inherits System.Web.UI.WebControls.Button
I have defined a placeholder in my page like this; <asp:PlaceHolder ID=attrPlaceHolder runat=server></asp:PlaceHolder> I
Creating an ASP.NET AJAX Server Control. Overriding the RenderContents method, I placed in this
i placed one button in a page .when click on that need to show
I've placed below code at the top of the Joomla template but the position
I have placed an image on the master page. I see the image at
I've placed a table inside a div and set the table width to 100%.
Someone can explain this error? Error Creating Control - head Object reference not set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.