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

input an XML to rad list box

3 Answers 60 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Arian
Top achievements
Rank 1
Arian asked on 28 Aug 2011, 05:28 PM
hi.
thank you for your help.
 i wonder to ask about a way to read data from an XML file and insert them to a rad list box.
my xml structure is like this:
<Title>
    <Images>
        <Image> 1.jpg</Image>
        <text>something</text>
     <Images>
    .
     .
       .
<Title>
i want to load value of <image> tag into image url propertie and value of <text> tag to text propertie of each item in radlistbox.

3 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 29 Aug 2011, 04:07 PM
Hi Arian,

Please refer to the following demo showing how to populate the RadListBox from XML file.

All the best,
Dimitar Terziev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Arian
Top achievements
Rank 1
answered on 29 Aug 2011, 09:29 PM
hi Dimitar . thank you for your answer.but actually i did it before. but this sample is not responding in this case....
i cant change the structure of XML and also rad list box couldn't read my file...,  
any other suggestion?
0
Dimitar Terziev
Telerik team
answered on 31 Aug 2011, 03:07 PM
Hi Arian,

In case the structure of the xml files is not the one supported by the RadListBox , you should manually parse the XML file, create the RadListBox Items and assign the corresponding value to them.

All the best,
Dimitar Terziev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
ListBox
Asked by
Arian
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Arian
Top achievements
Rank 1
Share this question
or