in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Binding to an un-typed dataset

Last post 02-25-2008 3:30 AM by PhilMurray. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-15-2008 11:16 AM

    Binding to an un-typed dataset

    Can you bind a chart with two series to an untyped dataset.

     When I run the below code I get nothing in the chart but running the same dataset when it is typed I get the chart displaying correctly

       chrtDailyProd.DataSource = dataset.Tables(0)

       chrtDailyProd.ChartGroups(0).ChartData.SeriesList(0).X.DataField = "Field1"

       chrtDailyProd.ChartGroups(0).ChartData.SeriesList(0).Y.DataField = "Field2"

       chrtDailyProd.ChartGroups(0).ChartData.SeriesList(0).LineStyle.Thickness = 5

       chrtDailyProd.ChartGroups(0).ChartData.SeriesList(0).LineStyle.Color = Color.Red

       chrtDailyProd.ChartGroups(0).ChartData.SeriesList(0 + 1).X.DataField = "Field1"

       chrtDailyProd.ChartGroups(0).ChartData.SeriesList(0 + 1).Y.DataField = "Field3"

       chrtDailyProd.ChartGroups(0).ChartData.SeriesList(0 + 1).LineStyle.Color = Color.Blue

       chrtDailyProd.ChartGroups(0).ChartData.SeriesList(0 + 1).LineStyle.Thickness = 2

     

    Thanks

     

    Phil

    Filed under:
  • 02-25-2008 3:30 AM In reply to

    Re: Binding to an un-typed dataset

    Never mind, I sorted it out
Page 1 of 1 (2 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.