This is a migrated thread and some comments may be shown as answers.

DataSet binding

2 Answers 43 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Lukas
Top achievements
Rank 1
Lukas asked on 02 Feb 2010, 10:56 AM

Hi,

I have no problems binding my classes to the GridView. But when I attempt to bind a linq filtered DataSet table

IEnumerable<DB.MyDataSet.XXXRow> filter = dataset.XXX.Take(10);

GridView.ItemsSource = filter;

all I see in GridView is rows with no text in them, when I enter edit mode in a row, the missing text is suddenly right there. It goes invisible again when edit mode is canceled.

This is how I setup the header:

Telerik.Windows.Controls.GridViewDataColumn columnName = new Telerik.Windows.Controls.GridViewDataColumn();         


columnName.DataType = typeof(string);

columnName.UniqueName = "YYY";

columnName.Header = "sweet YYY"

any ideas what is going on?

Thanks

Jiri

2 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 02 Feb 2010, 11:45 AM
Hi Jiri,

Please try:

GridView.ItemsSource = filter.OfType<DataRow>();

and let me know about the result.

Kind regards,
Vlad
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Lukas
Top achievements
Rank 1
answered on 02 Feb 2010, 12:25 PM

I have no idea why, but sure enough - it works perfectly.

Thanks

Jiri

Tags
GridView
Asked by
Lukas
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Lukas
Top achievements
Rank 1
Share this question
or