Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
How do I bind UltraWinChart to a custom collection
posted

I have a custom collection that I want to bind my ultraWinChart to.  I also want to Exclude some of the columns.  How do I do this?

I have tried the following unsuccessfully:

private void ultraChart1_Load(object sender, EventArgs e)

{

PlayTimeDataService PlayTimeDataService = new PlayTimeDataService();

BaseEntityCollection<PlayTime> PlayTime = default(BaseEntityCollection<PlayTime>);

PlayTime = PlayTimeDataService.Playtime_GetByNFLLeagueID(33130);

this.PlayTimeBindingSource.DataSource = PlayTime;

this.ultraChart1.DataSource = PlayTime;

this.ultraChart1.DataBind();

 

ultraChart1.Data.IncludeColumn("NFLLeagueID", false);

ultraChart1.Data.IncludeColumn("Season", false);

ultraChart1.Data.IncludeColumn("Week", false);

}

 

 

 

 

 

 

 

 

 

 

 

 

 

private void ultraChart1_Load(object sender, EventArgs e)

{

    

 

 

PlayTimeDataService PlayTimeDataService = new PlayTimeDataService();

BaseEntityCollection<PlayTime> PlayTime = default(BaseEntityCollection<PlayTime

>);

PlayTime = PlayTimeDataService.Playtime_GetByNFLLeagueID(33130);

 

 

 

this

.PlayTimeBindingSource.DataSource = PlayTime;

 

 

 

this

.ultraChart1.DataSource = PlayTime;

 

 

 

this

.ultraChart1.DataBind();

 

ultraChart1.Data.IncludeColumn(

 

 

"NFLLeagueID", false

);

ultraChart1.Data.IncludeColumn(

 

 

"Season", false

);

ultraChart1.Data.IncludeColumn(

 

 

"Week", false

);

 

 

 

Parents
No Data
Reply
  • 53790
    posted

    Hi,

    Could you please look at the code below and attached example. Please try this suggestion and if you have any questions do not hesitate to ask me.

    Regards

    Georgi

    DataTable dt = new DataTable();

    dt.Columns.Add("C1", typeof(int));

    dt.Columns.Add("C2",typeof(double));

    dt.Columns.Add("C3", typeof(string));

    dt.Rows.Add(1, 20.50,

     

    "Test1");

    dt.Rows.Add(2, 25.50, "Test2");

    dt.Rows.Add(3, 15.50,

     

    "Test3");

    dt.Rows.Add(4, 35.00, "Test4");

    ultraChart1.DataSource = dt;ultraChart1.DataBind();

    ultraChart1.Data.IncludeColumn(dt.Columns[

     

    "C1"], false);

    ultraChart1.Data.IncludeColumn(dt.Columns["C2"], true);

    ultraChart1.Data.IncludeColumn(dt.Columns[

     

    "C3"], false);

    UltraChartSaveToEMF.rar
Children
No Data