Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
i have a datalist and i use show many controls at itemcommand of data list
like this:

C#
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:
C#
Chart1.DataSource = dt;

Chart1.DataBind();


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
Updated 15-Jan-13 20:26pm
v6
Comments
[no name] 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?
MmukDakota 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 :)
Arun kumar Gauttam 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.

1 solution

I found The solution Its very easy:

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

System.Web.UI.DataVisualization.Charting
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900