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

DataGrid and XMl

3 Answers 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jamal Husien
Top achievements
Rank 1
Jamal Husien asked on 27 May 2010, 12:49 AM
dear all,
i have datagrid.
i use WCF to get the data from the database using store procudures.

my steps
1. call a  store procudures. on the sql server
2. get a DataSet
3. covert the Data set to XMl (ds.GetXML) then i return i back to the silverlight as sting.

i want to put the xml as ItemsSource of the RadDataGrid.

how i can do it

remark
1.the same store procudures execute diferent SQl statment, some time select * from tblclients
and some time select * from tblcustomers ...
2. the number of the row is so big so it is not good to use for to convert the XML to List.
3. on Flex i just convert the e.result to XML and write datagrid1.itemsSource=xmlresult.Table;



3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 27 May 2010, 07:01 AM
Hello,

You can use the approach demonstrated in this blog post instead transferring XML as string and later parse this on the Silverlight client.

Best wishes,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Jamal Husien
Top achievements
Rank 1
answered on 27 May 2010, 10:24 PM
Thanks
but i get the following error when i try to convert the dataTable to

IEnumerable

 

 

<Dictionary<string, object>>

 


'System.Data.DataTable' does not contain a definition for 'AsEnumerable' and no extension method 'AsEnumerable' accepting a first argument of type 'System.Data.DataTable' could be found (are you missing a using directive or an assembly reference?)
i use VS2010
0
Pavel Pavlov
Telerik team
answered on 28 May 2010, 07:50 AM
Hello Jamal Husien,

Please compare the using directives in the sample project with yours to check if something is missing.
Please check if you have the Using System.Linq directive.

You may also compare the referenced dlls.

Best wishes,
Pavel Pavlov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Jamal Husien
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Jamal Husien
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Share this question
or