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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:32:32+00:00 2026-05-30T19:32:32+00:00

I have an ItemTemplate Label inside Gridview which I haven’t bound with any DataField.

  • 0

I have an ItemTemplate Label inside Gridview which I haven’t bound with any DataField.
I have userId as one of the columns of GridView.
Based on the userId column, I want to get total no of assets acquired by the User. The totalNo doesn’t exists in the database. I have to manually fire a query and get total no of row counts.

Now, how to put this rowCount for each user inside GridView?

Any ideas?
I have tried onRowDataBound and FindControl, but how do I get rowIndex for that particular user?

  • 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-30T19:32:34+00:00Added an answer on May 30, 2026 at 7:32 pm

    You add an event function for the DataBound on your GridView and when its render the Header you can change it like:

    protected void grdView_RowDataBound(object sender, GridViewRowEventArgs e)
    {
         if (e.Row.RowType == DataControlRowType.Header)
         {
            for (int i = 0; i < e.Row.Cells.Count; i++)
            {
                e.Row.Cells[i].Text = "Custom header";
            }
         }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one GridView which has multiple columns. Here I just mentioned only the
I have a button inside my <ItemTemplate> in GridView and I want to call
I have a few controls defined inside an update panel which are bound to
If I have a label inside an itemtemplate of a repeater, the label is
Hi have a repeater which is inside a gridview. when i bind the data
as you can see in my code... i have a label inside ItemTemplate and
I have formview control. Inside formview control their is one gridview. In gridview i
I have a asp:GridView and inside it I have some TemplateFileds, one of them
I use asp.net 4 c#. I have a gridview, inside a Label. I would
I have a repeater control that contains an ItemTemplate containing a databound label and

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.