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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:12:17+00:00 2026-05-11T14:12:17+00:00

Im trying to add data into a new column I have created in my

  • 0

Im trying to add data into a new column I have created in my gridview. I create the column with the code below:

Dim Field As New BoundField Field.HeaderText = 'Cummulative Amount' Dim Col As DataControlField = Field Me.GridView1.Columns.Add(Col) 

Now I need to go in and add data for the rows below the column. I have seen ppl saying I need to set it equal to a datafield but how do I create a datafield from scratch then?

Thanks in advance,

  • 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. 2026-05-11T14:12:18+00:00Added an answer on May 11, 2026 at 2:12 pm

    Update:

    You can create this calculated column right in the markup for the gridview. Assuming that your datasource has an Field named ‘Amount’ and another field named ‘Quantity’ and that your ‘Cummulative Amount’ is a product of those two columns, you could do something like this:

    <asp:GridView runat='server' DataSource='sqlDataSource'>   <columns>     <asp:BoundField HeaderText='Amount' DataField='Amount' />     <asp:BoundField HeaderText='Quantity' DataField='Quantity' />     <asp:TemplateField HeaderText='Cummulative Amount'>       <ItemTemplate>         <asp:Label runat='server' Text='<%# Eval('Amount') * Eval('Quantity') %>' />       </ItemTemplate>     </asp:TemplateField>   </columns> </asp:GridView> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 264k
  • Answers 264k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Solution was disabling on router HTTP Multiplexing feature. May 13, 2026 at 12:18 pm
  • Editorial Team
    Editorial Team added an answer That is a bit of a strange way to initialize… May 13, 2026 at 12:18 pm
  • Editorial Team
    Editorial Team added an answer Need a single quote: Something like: string.Format("ListGUID = '{0}'", Convert.ToString(ViewState["GUID"])); May 13, 2026 at 12:18 pm

Related Questions

I'm trying to insert a column into an existing DataSet using C#. As an
I'm currently trying to run a LINQ query over a MS SQL database. This
I'm going through an XML file of articles and the journalist(s) that wrote them.
I'm trying to create a dynamic datagrid in Flex. The data is coming back

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.