Jump to content
Software FX Community

How to make certain Datasets unvisible?

Master Chief

Recommended Posts


When i use Datagridview Datasets i can make certain of them unvisible with following Code :

 for exp :  With Me.DataGridView1   .Columns("Startdatum").DisplayIndex = 0   .Columns("Linie").DisplayIndex = 1   .Columns("ArtikelNr").DisplayIndex = 2   .Columns("Stielbruch").DisplayIndex = 3   .Columns("Krummglas").DisplayIndex = 4   .Columns("Glasfehler").DisplayIndex = 5   .Columns("ErsteWahl").DisplayIndex = 6   .Columns("Stunde").Visible = False --------------> this Line Unvisible, will not be shown in DataGrid view


Now i need the same code for Chart FX DataGrid , cause there are Datasets i dont want to see and be painted in Chart FX

 Plz Help, Thanks



Link to comment
Share on other sites

They are different approaches, in the DataGridView there is a column for each field in the DataSet. This is not the case in Chart FX. The GridView is simpler because there is a direct mapping from fileds to columns, in Chart FX a field in the dataset can be used for many things: value, x-value, label, etc.

Instead of "hiding" what you don't want, you add what you want. For example:


chart.DataSourceSettings.Fieds.Add(new FieldMap("Sartdatum"),FieldUsage.Value);

chart.DataSourceSettings.Fieds.Add(new FieldMap("Linie"),FieldUsage.Value);

chart.DataSourceSettings.Fieds.Add(new FieldMap("ArtikelNr"),FieldUsage.Value);

chart.DataSourceSettings.Fieds.Add(new FieldMap("Stielbruch"),FieldUsage.Value);

chart.DataSourceSettings.Fieds.Add(new FieldMap("Krummglas"),FieldUsage.Value);

chart.DataSourceSettings.Fieds.Add(new FieldMap("Glasfehler"),FieldUsage.Value);

chart.DataSourceSettings.Fieds.Add(new FieldMap("ErsteWahl"),FieldUsage.Value);

chart.DataSourceSettings.Fieds.Add(new FieldMap("Stunde"),FieldUsage.Value);

 I don't know the use you want to give to each field, you must select the appropriate FieldUsage for each one.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...