Master Chief Posted August 9, 2007 Report Share Posted August 9, 2007 Hallo, 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 MC Quote Link to comment Share on other sites More sharing options...
Frank Posted August 9, 2007 Report Share Posted August 9, 2007 In Chart FX you do this using DataSourceSettings.Fields. For more information see the Programmer's Guide under "Passing Data -> Passing Data using Databases". Quote Link to comment Share on other sites More sharing options...
Master Chief Posted August 10, 2007 Author Report Share Posted August 10, 2007 Hallo Frank, first of all, thanks for the quick and good help. But i still have Problems with the Datasets, i Quote Link to comment Share on other sites More sharing options...
Frank Posted August 10, 2007 Report Share Posted August 10, 2007 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.Fields.Clear(); 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.