473,386 Members | 1,733 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,386 software developers and data experts.

Dynamic Calculations in a GridView?

Hi,

I have a series of Database tables which hold various fields and details of
how they are calculated.

I take these details and bind them to a Gridview with a Description of each
item and a textbox so the user can input some integer value.

On the server side in my C# code I do some calculations dynamically.

I want to do these dynamically also on the client side in JavaScript. My
questions are as follows:
1 To do this I need to push out my database details of how the fields are
calculated on the client. I get back a collection of ojects in my c# code
where each object has an id and details of the calculation for each field.
How can I stored this on the form so I can get a handle on it in my
JavaScript?
2 I need to be able to get the id from my GridView so I can do my
calculations. I have this in my GridView but I don't want to display this on
the UI so I have set the BoundColumn to be not visible. As a result it does
not get rendered so I cannot get a handle on it.

Any advice on above would be greatly appreciated.

Thanks in Advance,
C.
Oct 2 '07 #1
1 2096
look at JSON serialization a standard for javascript. there are several
libraries for this, and the MS ajax kit also contains one.

-- bruce (sqlwork.com)
C wrote:
Hi,

I have a series of Database tables which hold various fields and details of
how they are calculated.

I take these details and bind them to a Gridview with a Description of each
item and a textbox so the user can input some integer value.

On the server side in my C# code I do some calculations dynamically.

I want to do these dynamically also on the client side in JavaScript. My
questions are as follows:
1 To do this I need to push out my database details of how the fields are
calculated on the client. I get back a collection of ojects in my c# code
where each object has an id and details of the calculation for each field.
How can I stored this on the form so I can get a handle on it in my
JavaScript?
2 I need to be able to get the id from my GridView so I can do my
calculations. I have this in my GridView but I don't want to display this on
the UI so I have set the BoundColumn to be not visible. As a result it does
not get rendered so I cannot get a handle on it.

Any advice on above would be greatly appreciated.

Thanks in Advance,
C.
Oct 2 '07 #2

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

Similar topics

4
by: Larry Grady | last post by:
Anyone up for a challenge? I've been struggling with this for a few days and was hoping someone could help me. Pouring through all the messageboards I just can't find the solution. We have a...
3
by: NateDawg | last post by:
I'm reposting this. I'm kinda in a bind untill i get this figured out, so if anyone has some input it would sure help me out. Ok, I’ve noticed a few gridview problems floating around the forum....
0
by: loga123 | last post by:
Hi All, I have a requirement where I need to build a dynamic gridview. I am using asp .net 2.0. I have to display non-key columns of a table in the gridview and make user to be able to...
0
by: K B | last post by:
PLEASE be patient and read this. I believe I've actually reached the end of the Web trying to find the answer! I have an aspx using a MasterPage with a ContentPlaceholder. I have a datatable...
4
by: Ken Wigle | last post by:
All, I would be very grateful for any help on this question. I have an application in asp.net 2.0 where I dynamically create a datatable and then bind that to a gridview. Unfortunately, the...
0
by: Tony Hedge | last post by:
Okay I'm back with another issue ;-) Platform is .NET, VB 2005... I created a templace class that I was successfully able to add as a template column to a GridView control - dynamically!!! So...
7
by: =?Utf-8?B?SmVmZiBCZWVt?= | last post by:
The default paging behavior of the gridview doesn't work well with very large sets of data which means we have to implement some sort of custom paging. The examples I have seen (4guysfromrolla,...
1
by: =?Utf-8?B?cGVsZWdrMQ==?= | last post by:
i have a GridView which i can Page on (go to page 2,10,...) the thing is that i have a dynamic query which set the GridView from starts on page 1. the thing is that when i start to go over the...
14
by: agamoto | last post by:
hello guys, i don't know if this is the right tread to post but i have the following problem: i've built a dynamic gridview in run time because the gried values (columns, headers, etc) are...
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: 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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.