Click here to Skip to main content
13,256,323 members (54,856 online)
Rate this:
Please Sign up or sign in to vote.
See more:
i have a datalist and i use show many controls at itemcommand of data list
like this:

protected void DataList4_ItemCommand(object source, DataListCommandEventArgs e)
       RadioButton rd5 = (RadioButton)e.Item.FindControl("RadioButton5");

Now My problem is I want to use Chart contol at itemCommend,

like this:
Chart1.DataSource = dt;

And I am try this:
chart chart1 = (chart)e.Item.FindControl("chartshow");

it also not support at item commend,

so plz help me, how can i use chart control at itemcommend,

you also provide solution to me at gridView_RowCommand if possiable
Posted 3-Jan-13 0:03am
Updated 15-Jan-13 21:26pm
Sheikh Muhammad Haris 3-Jan-13 20:07pm
Seems interesting. Let me try :)
Sandeep Mewara 7-Jan-13 8:51am
How is Chart control bind method related or close to gridview rowcommand?
Member 9731376 7-Jan-13 9:43am
K let me try also, from this i understand u hve an item and bind to chart.
for now u can use Datasource= tableBindingSource, and then use this with Series property of the chart.
Still let me try first :)
Arun1990 8-Jan-13 0:22am
i thing you not understand my problem,
my problem is i want to use chart control at rowcommand of gridview,

because i wand to bind chart control after click in a button which is in GridView
Suvabrata Roy 8-Jan-13 1:07am
Hi Arun,

I think you need to show some chart on click of some specific button in DataGrid.

Then why you need chart chart1 = (chart)e.Item.FindControl("chartshow");

or you need populate Chart in between two rows.
Arun1990 8-Jan-13 2:15am
This is my problem:
chart chart1 = (chart)e.Item.FindControl("chartshow");

this is not support in gridview row command,
Try it,
Because i am able to write
RadioButton rd5 = (RadioButton)e.Item.FindControl("RadioButton5");

But Not This

chart1 = (chart)e.Item.FindControl("chartshow");

I thing Micro soft Not Provide this

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I found The solution Its very easy:

just add namespace to top of page and you will get chart control at itemdatabound:


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.171114.1 | Last Updated 14 May 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100