473,406 Members | 2,273 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,406 software developers and data experts.

Solution to ARGH! ...

Hi All :-)

No one has posted with any suggestions on how to get a grand total or computed column value back into a usable variable to perform percentage calculation on the same column you are getting the grand total for. I ended up creating another datagrid to dump the grand total in and calling the value of the cell from the new datagrid. The problem was that .Items().Cells().Value isn't available in the .Net Datagrid at this point, you have to use.Text instead of .Value and you then have to convert the text back into a double. The solution is:

pd_col_10_grnd_tot = Double.Parse(dtg_grand_totals.Items(0).Cells(0).Te xt)
But you MUST do this AFTER you do the databind to the Second datagrid.

I found that there is an aftermarket tool by Infragistics that allows much more freedom with doing this type of code. In the Infragistics webgrid, the code was:

pd_col_10_grnd_tot = utg_grand_tot.Rows(0).Cells(0).Value

Why oh why can't Microsoft be as easy to use? I spent about eight hours researching, testing, trying PreRender,compute column, .ToString, etc... EVERYTHING I could think of and the answer was extremely simple using the Infragistics UltraWebGrid, but although similar, it was not until I tried using the UWG that I discovered how to get this to work for me using .Net's Datagrid!!!

Coleen

Nov 21 '05 #1
3 2017
Well, I spoke to soon again, because I still get the Infinity in all the rows where I tried to use the variable I got from the second datagrid, although I now know how to get the value from .Net's datagrid almost as easily as from Infragistic's WebGrid. I am going to have to create another datagrid to use to do all the calculations using the Grand total amount and make sure to call the variables from my first datagrid After I do the databind. It really seams as though there would be an easier way to do this. It can be done SO easily in Excel, that it is frustrating NOT to be able to do the same thing in .Net or any other language!
"Coleen" <co**********@yaho.com> wrote in message news:OV**************@TK2MSFTNGP11.phx.gbl...
Hi All :-)

No one has posted with any suggestions on how to get a grand total or computed column value back into a usable variable to perform percentage calculation on the same column you are getting the grand total for. I ended up creating another datagrid to dump the grand total in and calling the value of the cell from the new datagrid. The problem was that .Items().Cells().Value isn't available in the .Net Datagrid at this point, you have to use.Text instead of .Value and you then have to convert the text back into a double. The solution is:

pd_col_10_grnd_tot = Double.Parse(dtg_grand_totals.Items(0).Cells(0).Te xt)
But you MUST do this AFTER you do the databind to the Second datagrid.

I found that there is an aftermarket tool by Infragistics that allows much more freedom with doing this type of code. In the Infragistics webgrid, the code was:

pd_col_10_grnd_tot = utg_grand_tot.Rows(0).Cells(0).Value

Why oh why can't Microsoft be as easy to use? I spent about eight hours researching, testing, trying PreRender,compute column, .ToString, etc... EVERYTHING I could think of and the answer was extremely simple using the Infragistics UltraWebGrid, but although similar, it was not until I tried using the UWG that I discovered how to get this to work for me using .Net's Datagrid!!!

Coleen

Nov 21 '05 #2
Coleen,

See my sample in the second thread about this (while this is the thirth, so
please keep in the original threads).

Cor
Nov 21 '05 #3
I agree, the DataGrid is crap.

In VS2005, a lot of these types of issues are removed with a new control called GridView. I know that doesent help you now, but have some faith that MS are addressing these issues. VS2005 is a 'Vast' improvement over VS2003.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Coleen" <co**********@yaho.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...
Well, I spoke to soon again, because I still get the Infinity in all the rows where I tried to use the variable I got from the second datagrid, although I now know how to get the value from .Net's datagrid almost as easily as from Infragistic's WebGrid. I am going to have to create another datagrid to use to do all the calculations using the Grand total amount and make sure to call the variables from my first datagrid After I do the databind. It really seams as though there would be an easier way to do this. It can be done SO easily in Excel, that it is frustrating NOT to be able to do the same thing in .Net or any other language!
"Coleen" <co**********@yaho.com> wrote in message news:OV**************@TK2MSFTNGP11.phx.gbl...
Hi All :-)

No one has posted with any suggestions on how to get a grand total or computed column value back into a usable variable to perform percentage calculation on the same column you are getting the grand total for. I ended up creating another datagrid to dump the grand total in and calling the value of the cell from the new datagrid. The problem was that .Items().Cells().Value isn't available in the .Net Datagrid at this point, you have to use.Text instead of .Value and you then have to convert the text back into a double. The solution is:

pd_col_10_grnd_tot = Double.Parse(dtg_grand_totals.Items(0).Cells(0).Te xt)
But you MUST do this AFTER you do the databind to the Second datagrid.

I found that there is an aftermarket tool by Infragistics that allows much more freedom with doing this type of code. In the Infragistics webgrid, the code was:

pd_col_10_grnd_tot = utg_grand_tot.Rows(0).Cells(0).Value

Why oh why can't Microsoft be as easy to use? I spent about eight hours researching, testing, trying PreRender,compute column, .ToString, etc... EVERYTHING I could think of and the answer was extremely simple using the Infragistics UltraWebGrid, but although similar, it was not until I tried using the UWG that I discovered how to get this to work for me using .Net's Datagrid!!!

Coleen

Nov 21 '05 #4

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

Similar topics

2
by: The Plankmeister | last post by:
Hi... I'm trying my hardest to understand fully how sessions work and how best to use them. However, all I can find is information that doesn't tell me anything other than that sessions store...
3
by: Wayne Wengert | last post by:
I have a solution. I want to clone it to try some different options. Is there a way to open Solution A, save it as Solution B and then be able to try some things in Solution B without affecting...
10
by: Simon Jefferies | last post by:
Hello, I'm getting a strange problem where when I load up my solution that has three projects:- a managed C++ .NET, one C++ lib, and a VB library. It locks up and doesn't load completely, I...
0
by: TEK | last post by:
Hello We have a quite huge project. To limit the solution size, rebuild time and so on we have divided the project in two different solution. One solution that holds the buiness entities, or...
6
by: darrel | last post by:
I'm using some validators for a form. I'm noticing that it writes the text out to the browser as a SPAN with it's visibility set to none. The problem is that it still takes up space, so I have...
15
by: dylpkls91 | last post by:
I have been researching this topic and come up with some code to make it work. It uses SSL and requires the 3rd party package Paramiko (which requires PyCrypto). However, at this moment I have no...
3
by: Manikandan | last post by:
Hi, I'm copying projects from a solution in the vss. In my local system i created solution ,added that project(make modification related to solution) When i added this solution to vss, projects...
0
by: techie | last post by:
List of Solution manuals: Engineering Circuit Analysis 6Ed - Hayt Solutions Manual Norbury - Solutions manual for mechanics and thermodynamics Physics For Scientists And Engineers - Solution...
16
by: =?Utf-8?B?RHdlZWJlcmVsbGE=?= | last post by:
I created an Access 2007 application for my customer. The application is shared by three employees on a server. It maintains a contact list including financial data and social security numbers. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.