Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Trying to bind to typed DataSet

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

Trying to bind to typed DataSet
Link Posted: 13-Jul-2007 10:57
I made a simple form with a strongly typed dataset.
When I bind the Rows to one of the tables, I can initialize the columns.
However, at runtime, every cell displays \"System.Data.DataRowView\".
It seems that the grid somehow doesn't read the DataColumns.
What would be best in this case, would be that the grid accesses the properties that the DataSet Generator has made. Same as when binding to a custom collection of business objects.
Am I doing something wrong?
I don't want to write a whole lot of code: the grid designer should be able to handle what I want to do.
With C1 TrueDbGrid, this is all very easy (there are other things that are not so easy - that's why I am evaluating Flygrid).

Hope you can help me.

I use VS Orcas. The generated data tables look like
    Partial Public Class ArticleDataTable
        Inherits Global.System.Data.TypedTableBase(Of ArticleRow)
Maybe that has something to do with the problem???

It turns out, that if you initialize a grid column with New NumberColumn(\"Id\", \"Id\") it does work, but if you let the generated code create a New NumberColumn and set the Caption afterwards, it does not work.
It seems like the property FieldName of a Column is not serialized in the generated code. Probably some Attribute set wrong.
Link Posted: 16-Jul-2007 10:46
Since no-one is paying attention to my problems, I'll post some follow-up myself.
I found out that the grid thinks the fieldname has the default value if it is the same as the caption. Default values do not get serialized.
If I change the caption to something different than the field name, the field name property becomes bold in the property grid, indicating it is regarded as not-default, and the value gets serialzed properly.
Link Posted: 16-Jul-2007 18:41
Please make sure that Column.FieldName is set correctly. When FieldName is wrong, FlyGrid can't find the DataColumn or another source of row to fetch data.
Link Posted: 23-Jul-2007 10:07
The problem is not that the fieldname is wrong.
The problem is, that the value of the property \"FieldName\", that I see in the Form designer (property window of Grid Columns) is not always serialized in the .Designer.vb code-behind.
To reproduce this problem, create a form, drag a FlyGrid control on it from the toolbox, Initialize columns, edit columns from the property window and set Caption. In my Visual Studio, the FieldName property value is written in normal font, not bold. This indicates that the FieldName property has the DEFAULT value. Default values are not converted into code in .Designer.vb.

Could you please do these steps and tell me whether you can reproduce the problem?
TIA
Marcel van Pinxteren