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

How to get value with Description

1 Answer 32 Views
ListControl
This is a migrated thread and some comments may be shown as answers.
Pro
Top achievements
Rank 1
Pro asked on 18 Feb 2015, 07:45 AM
Hello! Sorry my English, how to get selected item description value(DescriptionText ) from ListControl?
I add so
DescriptionTextListDataItem desc = new DescriptionTextListDataItem();<br>desc.Text = DotaText;
desc.Image = LoadImage(dotid.ToString());
desc.DescriptionText = family1 +
" " + name1;
desc.ForeColor = Color.Black;
usersList.Items.Add(desc);

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 18 Feb 2015, 08:53 AM
Hi Pro,

Thank you for writing.

You just need to cast the item to the respective typo and you will be able to access its DescriptionText:
DescriptionTextListDataItem selectedItem = radListControl1.SelectedItem as DescriptionTextListDataItem;
if (selectedItem != null)
{
    Console.WriteLine(selectedItem.DescriptionText);
}

I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ListControl
Asked by
Pro
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or