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 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

Related Questions

While trying to add value into foreign key field, if same data doesn't exist
I am using nhibernate and mvc3 in asp.net I'm trying to add data into
I am trying to add my data into multiple columns ListBox, I did it
I am trying to add Contact data in StructuredName with the following code. The
I have a list and I am trying to add the data to the
I'm trying to add a new JDBC Data Source connect to hive in oracle
What I am trying to do is have a user input his data into
Greetings All, I have a SQLite database that I'm trying to add a new
Here is my code Dim dt As DataTable = New DataTable(Intervenant) For Each column
I'm trying add data triggers to the default combobox style so each text item

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.