Software FX Posted August 5, 2006 Report Posted August 5, 2006 You need to reference ChartFX.WebForms.Data.dll and the namespace is ChartFX.WebForms.DataProviders -- Francisco Padron www.chartfx.com "Etariq" <etariq@msn.com> wrote in message news:MGs71$KuGHA.2136@webserver3.softwarefx.com... > Hi > am trying to bind my chart to array , but cant have the Listprovider > decleration , am i missing a using statment or a refr coz i hav the same > thing in my application an in the example but the Listprovider is not > showing > what should i do > and can i use this code to do so > > > GridViewRow[] Chartarr = new GridViewRow[GridViewData.Rows.Count]; > > GridViewData.Rows.CopyTo(Chartarr,0); > > and then bind it to my Chart , when i did this i got the properties in > the chart no the values :s dose this count as an array or not > > thanks > >
User (Legacy) Posted August 5, 2006 Author Report Posted August 5, 2006 Hi am trying to bind my chart to array , but cant have the Listprovider decleration , am i missing a using statment or a refr coz i hav the same thing in my application an in the example but the Listprovider is not showing what should i do and can i use this code to do so GridViewRow[] Chartarr = new GridViewRow[GridViewData.Rows.Count]; GridViewData.Rows.CopyTo(Chartarr,0); and then bind it to my Chart , when i did this i got the properties in the chart no the values :s dose this count as an array or not thanks
User (Legacy) Posted August 6, 2006 Author Report Posted August 6, 2006 hi thanks i was missing the data ref, but what about the code how can i come ove the problem , coz its working but its giving me the Propties og the rows insted of the data thanks "Software FX Support" <noreply@softwarefx.com> wrote in message news:NzjzTTLuGHA.2444@webserver3.softwarefx.com... > You need to reference ChartFX.WebForms.Data.dll and the namespace is > ChartFX.WebForms.DataProviders > > -- > Francisco Padron > www.chartfx.com > > > "Etariq" <etariq@msn.com> wrote in message > news:MGs71$KuGHA.2136@webserver3.softwarefx.com... >> Hi >> am trying to bind my chart to array , but cant have the Listprovider >> decleration , am i missing a using statment or a refr coz i hav the same >> thing in my application an in the example but the Listprovider is not >> showing >> what should i do >> and can i use this code to do so >> >> >> GridViewRow[] Chartarr = new GridViewRow[GridViewData.Rows.Count]; >> >> GridViewData.Rows.CopyTo(Chartarr,0); >> >> and then bind it to my Chart , when i did this i got the properties in >> the chart no the values :s dose this count as an array or not >> >> thanks >> >> > >
User (Legacy) Posted August 6, 2006 Author Report Posted August 6, 2006 hi i have created a sub for that and its working as i wanted here is the code public void GetMyChartData( SqlDataSource MySqlDatasource ,GridView MyGridView,Chart MyChart ,Boolean OnlyGridData) { if (OnlyGridData == true) { DataView ChartDataView = (DataView)MySqlDatasource.Select(DataSourceSelectArguments.Empty); if (ChartDataView != null) { DataTable chartDt = ChartDataView.Table.Clone(); GridViewRow[] Chartarr = new GridViewRow[MyGridView.Rows.Count]; MyGridView.Rows.CopyTo(Chartarr, 0); foreach (GridViewRow row in Chartarr) { DataRow datarw; datarw = chartDt.NewRow(); for (int i = 0; i < row.Cells.Count; i++) { datarw[i] = row.Cells[i].Text; } chartDt.Rows.Add(datarw); } MyChart.DataSource = chartDt.DefaultView; } } else { MyChart.DataSource = MySqlDatasource; } MyChart.DataBind(); } "Software FX Support" <noreply@softwarefx.com> wrote in message news:NzjzTTLuGHA.2444@webserver3.softwarefx.com... > You need to reference ChartFX.WebForms.Data.dll and the namespace is > ChartFX.WebForms.DataProviders > > -- > Francisco Padron > www.chartfx.com > > > "Etariq" <etariq@msn.com> wrote in message > news:MGs71$KuGHA.2136@webserver3.softwarefx.com... >> Hi >> am trying to bind my chart to array , but cant have the Listprovider >> decleration , am i missing a using statment or a refr coz i hav the same >> thing in my application an in the example but the Listprovider is not >> showing >> what should i do >> and can i use this code to do so >> >> >> GridViewRow[] Chartarr = new GridViewRow[GridViewData.Rows.Count]; >> >> GridViewData.Rows.CopyTo(Chartarr,0); >> >> and then bind it to my Chart , when i did this i got the properties in >> the chart no the values :s dose this count as an array or not >> >> thanks >> >> > >
Recommended Posts
Archived
This topic is now archived and is closed to further replies.