5 Answers, 1 is accepted
0
Hello Tareq,
You can use the SelectedItem property to change the selection in RadDataBoundListBox. You can set it to an object at a specified index within your source collection and this item will become selected in RadDataBoundListBox.
Greetings,
Deyan
the Telerik team
You can use the SelectedItem property to change the selection in RadDataBoundListBox. You can set it to an object at a specified index within your source collection and this item will become selected in RadDataBoundListBox.
Greetings,
Deyan
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
0
Tariq
Top achievements
Rank 2
answered on 12 Jul 2011, 03:44 PM
its not working, or maybe am doing something wrong, heres my code:
this is my Page Load, and this a button even to select the data:
private
void
PhoneApplicationPage_Loaded(
object
sender, RoutedEventArgs e)
{
XDocument loadedData = XDocument.Load(
"EngToAra.xml"
);
var data = from query
in
loadedData.Descendants(
"word"
)
select
new
Ara
{
Arabic = (
string
)query.Element(
"arabic"
),
English = (
string
) query.Element(
"english"
)
};
List<Ara> d = data.ToList<Ara>();
ara = d;
radListBox.ItemsSource = data;
}
this is my Page Load, and this a button even to select the data:
private
void
button1_Click(
object
sender, RoutedEventArgs e)
{
radListBox.SelectedItem = ara[100];
}
0
Hello Tareq,
Thanks for writing.
Based on what I am seeing in your code snippet I think that the selection should work as expected. Could you please prepare a small demo project that reproduces the issue and send it to us in a new support ticket so that we can see what actually goes wrong and thus be able to further assist you.
Thanks for your time.
Greetings,
Deyan
the Telerik team
Thanks for writing.
Based on what I am seeing in your code snippet I think that the selection should work as expected. Could you please prepare a small demo project that reproduces the issue and send it to us in a new support ticket so that we can see what actually goes wrong and thus be able to further assist you.
Thanks for your time.
Greetings,
Deyan
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
0
Tariq
Top achievements
Rank 2
answered on 12 Jul 2011, 04:06 PM
where should i send it to? and whats support ticket?
EDIT: never mind, i got it.
EDIT: never mind, i got it.
0
Tariq
Top achievements
Rank 2
answered on 12 Jul 2011, 06:31 PM
i got it, it was the assigning thingy in the load event, i should just assign the item source to the List instead of the var data.
thanks,
thanks,
private
void
PhoneApplicationPage_Loaded(
object
sender, RoutedEventArgs e)
{
XDocument loadedData = XDocument.Load(
"EngToAra.xml"
);
var data = from query
in
loadedData.Descendants(
"word"
)
select
new
Ara
{
Arabic = (
string
)query.Element(
"arabic"
),
English = (
string
) query.Element(
"english"
)
};
List<Ara> d = data.ToList<Ara>();
ara = d;
// radListBox.ItemsSource = data;
radListBox.ItemsSource = ara;
}