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

Gridnotsupportedexception when trying to bind xml to datagrid

1 Answer 97 Views
Grid
This is a migrated thread and some comments may be shown as answers.
G S S
Top achievements
Rank 1
G S S asked on 17 Apr 2008, 02:09 PM
First of all, I'd just like to say that Telerik Controls are great and do wonders for my work in ASP.NET.


My question is, I have a simple xml file (see below) and I want to bind this to the datagrid. When I do this, I get a GridNotSupportedException: Cannot find any bindable properties.


When binding XML, I thought that the code in the codebehind will be automatically generated for me, but it wasn't? So do I have to enter this code:


http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/GridFromXml/DefaultCS.aspx

My XML file is like this:

<?xml version="1.0"?>
<Skillset>
  <skill>
      <technology>
                  <type>Charlie</type>
                  <experience>Key</experience>
        </technology>
           
    </skill>
   
 
</Skillset>

What do I do?
Alternatively, if I can't bind to XML, what collection works with the Grid which will support multiple columns?

Thanks

1 Answer, 1 is accepted

Sort by
0
plamen
Top achievements
Rank 1
answered on 18 Apr 2008, 11:23 AM
Hi :)

I would suggest you to use XmlDataSource.


You can review the following RadGrid resources:


Editing XML using XmlDataSource
Population/data editing with XMLDataSource control


Regards...
<John:Peel />
Tags
Grid
Asked by
G S S
Top achievements
Rank 1
Answers by
plamen
Top achievements
Rank 1
Share this question
or