473,387 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Calculating Fields in an ASP Table using VB.Net

Ok, after all the research on datagrids, I've found that they won't really work for what I'm trying to do...I have a table that I need to have three columns as static data (but each row has a different value) and two other columns that have to do calculations, and a summary row/footer at the bottom of the table.

I guess maybe I'm stupid, because even with the help and information I've been given, how to populate each static column with different data in each row - I don't get! So, I've gone back to an ASP Table that I can hard-code the columns with the static data and do the calculations. My question is, does anyone have an easy way to do my calculation columns and footer in the table? TIA

Coleen
---
Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/
Nov 20 '05 #1
4 3414
Cor
Hi Coleen

I think you just have to think this over.

In a normal table is a calculation and footer row in my opinion only
something that is put on the page after normal calculations, maybe only some
other design but that is than normal HTML and maybe CSS,

Or am I seeing something wrong?

Cor
Ok, after all the research on datagrids, I've found that they won't really work for what I'm trying to do...I have a table that I need to have three
columns as static data (but each row has a different value) and two other
columns that have to do calculations, and a summary row/footer at the bottom
of the table.
I guess maybe I'm stupid, because even with the help and information I've

been given, how to populate each static column with different data in each
row - I don't get! So, I've gone back to an ASP Table that I can hard-code
the columns with the static data and do the calculations. My question is,
does anyone have an easy way to do my calculation columns and footer in the
table? TIA
Nov 20 '05 #2
Thanks Cor - I need to do calculations in three Columns AND in the footer. I know this probably won't turn out but here is what I need:

Column1 Column2 Column3 Column4 Column5 Column5
Data Data Data Calc Data Calc
in this Data Data Calc Data Calc
Column Data Data Calc Data Calc
is hard Data Data Calc Data Calc
coded Data Data Calc Data Calc
and Data Data Calc Data Calc
different Data Data Calc Data Calc

Totals Sum Sum Sum Sum Sum

I need to do calculations in at least two columns AND a Footer. I think this could be done in a datagrid, but I don't know how to hard code Column1 - This column has different data for each row HARD coded. Ugh! Any suggestions? There's a lot going on in this table, it's all read only (for THIS table) so I was hoping to use a datagird. Thanks for any/all help :-) Coleen

---
Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/
Nov 20 '05 #3
Cor
Hi Colleen,

You said you did research on the datagrid,

Why are you not building your own datatable I think that will work, it is
not that hard to do
I type it here roughy
\\\
dim dt as new datatabel("Coleen")
dim dc1 as new datacolomn("Column1")
dt.columns.add(dc1)
dim dc2 as new datacolomn("Column2")
dt.columns.add(dc2)
till 5 than you can fill the table with all you want (but have a look at
datacolumn you can do more)
If you did this you can do to file a field as second item in the third row
dt.rows(2).item("Column2) =mydata or text
or just as I do
dt.rows(2)(1) = mydata or text
And than
datagrid1.datasource = dt
etc.
////

I hope this helps?

Cor
Thanks Cor - I need to do calculations in three Columns AND in the footer. I know this probably won't turn out but here is what I need: Column1 Column2 Column3 Column4 Column5 Column5
Data Data Data Calc Data Calc
in this Data Data Calc Data Calc
Column Data Data Calc Data Calc
is hard Data Data Calc Data Calc
coded Data Data Calc Data Calc
and Data Data Calc Data Calc
different Data Data Calc Data Calc

Totals Sum Sum Sum Sum Sum

I need to do calculations in at least two columns AND a Footer. I think this could be done in a datagrid, but I don't know how to hard code
Column1 - This column has different data for each row HARD coded. Ugh! Any
suggestions? There's a lot going on in this table, it's all read only (for
THIS table) so I was hoping to use a datagird. Thanks for any/all help :-)
Coleen

Nov 20 '05 #4
Hi Cor :-

Actually, I did create a complete ASP Table...I just found that I will need to do my calculations all the way down for two columns and still have to create a sum total in the footer. If I do the table, then I have a LOT of code to get each column(0).row(0) and so on for everycolumn and row in the table. I like your suggestion, if I understand it correctly, instead of giving the value of the variable for the columns, I give it a text value and hard code it? Thanks - I will try that tommorrow when I get back to my office. Thanks a lot for your help :-

Coleen

---
Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: JLM | last post by:
I have a table that has fieldA, fieldB, fieldC. I want fieldC=fieldA-fieldB. simple enough. the next record I want to be able to do the same on the new value of fieldC. I can do this with SAP...
1
by: jlm | last post by:
I have a form which feeds table (TblEmpLeave) of Employee Leave Time (time taken off for Administrative, Annual, Sick, Compensation leave). I have EmpID, LeaveDate, LeaveType, LeaveHours fields on...
1
by: Megan | last post by:
quick summary: i'm having problems trying to group fields in a report in order to calculate percentages. to calculate percentages, i'm comparing the results from my grouped fields to the totals....
1
by: Tony Williams | last post by:
I have a table with two fields, txtvalue (a number field) and txtmonth ( a date/time field). I want to create a report that shows the difference in value between the value in txtvalue in one value...
3
by: luscus | last post by:
Thanks for all the responses on my first question. Unfortunately the answers I was given were too complicated for my small brain , and neophite condition to understand. So if you could talk down to...
2
by: kuhni | last post by:
Hi everybody! After searching newsgroups for a couple of hours, I now try asking directly (running the risk of asking again the same question). My problem is to predict when the size of the...
3
by: JDiamond | last post by:
Hi, I have a table called Hosts. The Hosts table contains the following fields: Each field represents a step in the project. The tech that completes each step initials the respective...
8
by: King | last post by:
Hi I have following MS Acess query Here is the query ID Name Prgm ID Client ID Date Start Time End Time Minutes C4 Trisha TIP DEK0703 7 /7 /2006...
6
by: Adam1331 | last post by:
I am currently setting up a database for work that will operate as a timesheet. I have set up multiple tables, queries, forms and reports to help this process run smoothly. The issue that has...
49
by: Constantine AI | last post by:
Hi i am trying to calculate two fields 'AcrossGrain' and 'WithGrain' both of which have equations assigned to them for example: Equations: Depth-BBackVoid-CarcT or Height-CarcT*2 I do have a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.