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 6251081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:32:51+00:00 2026-05-24T13:32:51+00:00

Q: How to put a table from two columns and one row in the

  • 0

Q:

How to put a table from two columns and one row in the footer of the gridview. the footer doesn’t belong to any column .

  • 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-05-24T13:32:51+00:00Added an answer on May 24, 2026 at 1:32 pm

    You could generate the footer manually from codebehind in RowCreated of the GridView.

    For example:

    protected void GridView1_RowCreated(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.Footer) {
            var grid = (GridView)sender;
            Label lbl1 = new Label();
            Label lbl2 = new Label();
            TableCell footerCell = new TableCell();
            TableCell cell1 = new TableCell();
            TableCell cell2 = new TableCell();
            TableRow footerRow = new TableRow();
            Table footerTable = new Table();
            e.Row.Cells.Clear();
            footerCell.Controls.Add(footerTable);
            footerTable.Rows.Add(footerRow);
            lbl1.ID = "lbl1";
            lbl2.ID = "lbl2";
            cell1.Controls.Add(lbl1);
            cell2.Controls.Add(lbl2);
            footerRow.Cells.Add(cell1);
            footerRow.Cells.Add(cell2);
            e.Row.Cells.Add(footerCell);
        }
    }
    
    protected void GridView1_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.Footer) {
            DataRow row = getFooterSource().Rows[0];
            var lbl1 = (Label)e.Row.FindControl("lbl1");
            var lbl2 = (Label)e.Row.FindControl("lbl2");
            lbl1.Text = row["Col1"];
            lbl2.Text = row["Col2"];
            e.Row.Cells[0].ColumnSpan = ((DataTable)((GridView)sender).DataSource).Columns.Count;
        }
    }
    
    //get some mock-data
    private DataTable getFooterSource()
    {
        DataTable tblFooter = new DataTable("Footer");
        tblFooter.Columns.Add(new DataColumn("Col1", typeof(string)));
        tblFooter.Columns.Add(new DataColumn("Col2", typeof(string)));
        var footerRow = tblFooter.NewRow();
        footerRow(0) = "first column's value";
        footerRow(1) = "second column's value";
        tblFooter.Rows.Add(footerRow);
        return tblFooter;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Simply put, I have a table with, among other things, a column for timestamps.
Is it possible to import the attributes of one table, then I put it
I have two tables: stamps primary stamp_id, firstStampIdInSerie_id (is same for stamps from one
I want PLSQL to generate strings like: COMMENT ON COLUMN TABLE.COLUMN IS 'comment from
I'm trying to use Scala/Swing to create a Table, one of whose columns is
I want to make a table that simply has two integer columns to serve
I'm trying to get data from one database and put it in the format
I have two tables, one called Events and one called Documents. Each table has
Possible Duplicate: Combining several database table together? I want from two database table get
I'm trying to construct a query that will map two columns, one, a date

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.