PC Review


Reply
Thread Tools Rate Thread

Dynamic Calculations in a GridView?

 
 
=?Utf-8?B?Qw==?=
Guest
Posts: n/a
 
      2nd Oct 2007
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.
 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      2nd Oct 2007
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.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic GridView pansell@douc.com Microsoft ASP .NET 2 13th Mar 2008 01:38 AM
Can I use Dynamic Ranges to automate complex calculations? Exceluser Microsoft Excel Misc 5 21st Dec 2007 09:25 PM
dynamic dataformatstring in a gridview Tarren Microsoft ASP .NET 0 18th Aug 2006 04:54 PM
Dynamic calculations according to user input David Microsoft Excel Programming 4 11th Oct 2005 08:44 PM
Perform dynamic calculations in DataGrid. =?Utf-8?B?Sm9iIExvdA==?= Microsoft Dot NET 1 29th Jul 2004 12:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:13 PM.