Home - Forums-.NET - FlyGrid.Net (Windows Forms) - why am i getting System.Data.Datarowview in my flygrid?

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

why am i getting System.Data.Datarowview in my flygrid?
Link Posted: 03-Oct-2006 02:24
This issue just occured and i am not sure why. When i set my flygrids rows.datasource equal to my datatable the only thing that displays in my grid is \"System.Data.Datarowview\" in each column for each row that the results return. the grid was working then i added another grid to another form and it did this. any ideas? the only thing i changed was that i bought the flybrid control and updated the references for the application to point to the new licsensed controls. i have since deleted the control from the app and readded it. still the same error.


here is the code i am using to assign data to the grid
FlyGrid1.Rows.DataSource = data

thanks
GK
Link Posted: 03-Oct-2006 04:35
You should specify Column.FieldName property for each column in your FlyGrid.Net to correctly display data.
Link Posted: 03-Oct-2006 05:24
[quote="NineRays"]You should specify Column.FieldName property for each column in your FlyGrid.Net to correctly display data.


Is this the same as right clicking on the grid and manually specifying the columns in the "Column Collection". If so, i have already done that.
Link Posted: 03-Oct-2006 05:34
But it seems that the field names of columns are not associated with fields in the datasource connected, for example:
1. you datasource (dataview or datatable) have following fields: Order, OrderDate, CustomerName
2. You should add to FlyGrid columns with the same field names:
[c#]
flyGrid.Columns.Items.AddRange(
           new Column[]{
                  //first param - column caption, second - field name
                  new Column(\"Order\", \"Order\"),
                  new Column(\"Date\", \"OrderDate\"),
                  new Column(\"Customer\", \"CustomerName\"),
         }
);
Link Posted: 03-Oct-2006 07:57
ok, i got it. It seems that the Column FieldNames are case sensitive.

thanks for all your help tho.


GK
Link Posted: 03-Oct-2006 08:20
Case sensitivity is a feature of DataSet and DataTable classes,
when DataSet/DataTable's CaseSensitive property is true - string comparisons are case-sensitive.