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

  • SEARCH
  • Home
  • 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 9007387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:40:32+00:00 2026-06-16T01:40:32+00:00

ok so my goal is to add only 1 static row under the gridview

  • 0

ok so my goal is to add only 1 static row under the gridview headr EXAMPLE:

|coloumnHeader1|coloumnHeader2|coloumnHeader3|coloumnHeader4|

|———————-static Row—————————|
|DataBoundField|DataBoundField|DataBoundField|DataBoundField|
|DataBoundField|DataBoundField|DataBoundField|DataBoundField|
|DataBoundField|DataBoundField|DataBoundField|DataBoundField|
|DataBoundField|DataBoundField|DataBoundField|DataBoundField|
|DataBoundField|DataBoundField|DataBoundField|DataBoundField|
|DataBoundField|DataBoundField|DataBoundField|DataBoundField|

|———————-Footer——————————-|

my hunch is its got something with RowDataBound but that’s as far as i have got.

i guess i need to explain myself better : what i want to do is the equivalent to adding a new HeaderRow…
thnx for all the helpers 😀

FOUND THE ANSWER:
after a lot of googling i found what i was looking for ,
on the asp

<asp:GridView OnPreRender="grd_Pre" CssClass="table" ID="GridView1" runat="server" AutoGenerateColumns="False" 
   >

in the code behind

 protected void grd_Pre(object sender, EventArgs e)
{
    GridViewRow gv = new GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal);
    TableCell tc = new TableCell();
    tc.ColumnSpan = 3;
    tc.Text = "GridView Header";
    tc.Attributes.Add("style", "text-align:center");
    gv.Cells.Add(tc);
    this.GridView1.Controls[0].Controls.AddAt(0, gv);
}
  • 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-16T01:40:33+00:00Added an answer on June 16, 2026 at 1:40 am

    FOUND THE ANSWER:
    after a lot of googling i found what i was looking for ,
    on the asp

    <asp:GridView OnPreRender="grd_Pre" CssClass="table" ID="GridView1" runat="server" AutoGenerateColumns="False" 
       >
    

    in the code behind

     protected void grd_Pre(object sender, EventArgs e)
    {
        GridViewRow gv = new GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal);
        TableCell tc = new TableCell();
        tc.ColumnSpan = 3;
        tc.Text = "GridView Header";
        tc.Attributes.Add("style", "text-align:center");
        gv.Cells.Add(tc);
        this.GridView1.Controls[0].Controls.AddAt(0, gv);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The goal is to be able to add a PDF file to the assets
I'm trying to add a text-only item to a databound menu control. So far
My end goal here is to be able to add two (or more) images
My goal is to add an argument to a program being executed if a
My goal is to add a string to array, and I do that in
My goal I would like to let browsers cache my whole website, but only
My goal is to fire an alarm for every event from eventsDb.getFavouriteEvents() but only
Goal: I want to add a pin it button (alongside the facebook and twitter
Goal : I wants when I drag image it become fade so we can
Goal is to make a dialog that appears on menu_key pressed, but it keeps

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.