We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

GridDataControl in Silveright, binding to XML or DataSet

Thread ID:

Created:

Updated:

Platform:

Replies:

99567 May 27,2011 12:41 PM Jun 1,2011 11:31 AM ASP.NET Web Forms (Classic) 5
loading
Tags: GridGroupingControl
Paul Sample
Asked On May 27, 2011 12:41 PM

Hello,

We want to use a GDC in a Silverlight page to display tables from an ad hoc query created by the user. Binding to a business object is not an option since we do not know ahead of time what format the data may be in. Ideally we would want to either bind to a DataSet or XML, yet DataSet is not available to Silverlight pages and apparently GDC does not bind directly to XML. Is there a solution for this problem?

Thanks,

Paul Sample
Senior Software Engineer, RSA Security


Rajasekar [Syncfusion]
Replied On May 31, 2011 06:50 AM

Hi Paul,

Thanks for your update.

We cannot bind the XML directly to the Silverlight Datagrid. But you can achieve your requirement by converting the XML Elements to the List. We have prepared the sample based on your requirement and please find the sample in the below location.

Sample: http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=SL_Grid_XML1002115001.zip

Please let us know if you have any queries.

Thanks,
Rajasekar



Paul Sample
Replied On May 31, 2011 09:50 AM

Hi Rajasekar,

The link is broken.

Regards,
-Paul


Paul Sample
Replied On May 31, 2011 10:16 AM

The link now works but your example does not meet our requirements. As I said in my initial post a list of business objects will not work because we do not know ahead of time what the data elements and columns may be. We are looking for something more generic like binding to a DataSet where we do not know ahead of time what the data may look like in terms of properties and fields

Regards,
-Paul


Paul Sample
Replied On May 31, 2011 11:23 AM

Just to clarify. We are looking to fill the GDC from a data query built by the user at run time. We will not know ahead of time what that data may look like

Regards
-Paul


Rajasekar [Syncfusion]
Replied On June 1, 2011 11:31 AM

Hi Paul,

Thanks for your update.

We cannot bind the XML data directly to the ItemsSource of the Silverlight DataGrid because it should be convert to Data Table or Dataset and then only we can to bind. Likewise we cannot bind the DB query without using Data Table. But, as you stated before in the framework itself there is no support for Data Table. so we cannot achieve this requirement. In Silverlight DataGrid, At present we can achieve this requirement only by using collection of objects.

Please let us know if you have any queries.

Thanks,
Rajasekar




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;