This is a migrated thread and some comments may be shown as answers.

[Solved] URGENT - Select parameters from CHECKBOXLIST

1 Answer 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
GV
Top achievements
Rank 1
GV asked on 13 Mar 2010, 01:16 AM

Hi telerik,


We recentlty start using telerik products. 

I have one table TABLE_JAPVALUES  :

DATE      RDVAL  PDVAL DPVAL  CTVAL ATVAL
1-1-09       100       50        45         85        90
1-2-09       50         20        15         50        55
1-3-09       120       40        40         70        95
1-4-09       100       30        30         95        80

I want a report where I can select what columns I want to see in report with Avg. of that columns

So I want a  ckeckboxlist  like this that should show all the columns of the table:

RDVAL
PDVAL
DPVAL
CTVAL
ATVAL

If I Only select these columns-
RDVAL
DPVAL
ATVAL

It should show REPORT like this:

DATE      RDVAL   DPVAL   ATVAL
1-1-09       100          45        90
1-2-09        50           15        55
1-3-09       120          40        95
1-4-09       100          30        80
AVG           92.5       32.5      80

 If I have some way to pass Select parameters to pass sql storedproc that will help.

Do you have any tutorial or sample code.

I will really appreciate your help.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 15 Mar 2010, 12:02 PM
Hi,

A suggestion would be to add all the columns and set their Aggreagate property to "Avg" to display the average and then show/hide the columns based on the checkbxlist selection using the client side showColumn and hideColumn functions.Here are some links that you will find useful:
Grid / Footer Aggregates
Grid / Client-side API
http://www.telerik.com/help/aspnet-ajax/grdgettingfamiliarwithclientapi.html

Hope this helps.

Princy
Tags
Grid
Asked by
GV
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or