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

Listbox control can't choose one of the items.

5 Answers 50 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Starry
Top achievements
Rank 1
Starry asked on 28 May 2012, 12:16 PM
Listbox control can't choose one of the items.    Issues such as the attached pictures.

ListBox  binding data sources   without    problem ,  but  I  can't  choose    the binding  items.

Why???

The  XAML:
      <telerik:RadPane Header="建筑功能" IsPinned="False">
                            <telerik:ListBox Name="tlb_BuildingFunc"  SelectedValuePath="DpCodeId"  DisplayMemberPath="DpCodeName" SelectionMode="Multiple" SelectedIndex="0"  />
      </telerik:RadPane>


The  xaml.cs:
  
         private void BindBaseDatas()
        {
            string weburl = Application.Current.Host.Source.ToString();
            weburl = weburl.Substring(0, (weburl.Length - 23)) + "/ChartsService.svc";
            MyChartsService.ChartsServiceClient client = new MyChartsService.ChartsServiceClient("CustomBinding_ChartsService1", weburl);
            client.GetCodeDetailsEntityDataAsync("BldingFunction");
            client.GetCodeDetailsEntityDataCompleted += new EventHandler<MyChartsService.GetCodeDetailsEntityDataCompletedEventArgs>(client_GetCodeDetailsEntityDataCompleted);
        }


        void client_GetCodeDetailsEntityDataCompleted(object sender, MyChartsService.GetCodeDetailsEntityDataCompletedEventArgs e)
        {
            ObservableCollection<MyChartsService.CodeDetailsEntity> regions = e.Result;
            tlb_BuildingFunc.ItemsSource = e.Result;
        } 

5 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 29 May 2012, 04:34 PM
Hello,

I would suggest using the RadListBox control instead of ListBox. Hope this helps. 

Regards,
George
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Starry
Top achievements
Rank 1
answered on 01 Jun 2012, 04:38 AM
Thanks  a  lot...
         But  there is  no  "RadListBox "    in  my  "RadControls  for  silverlight"  Toolkit....
         The Version  is  2010  Q2...   Where  is  the  control???
0
Lancelot
Top achievements
Rank 1
answered on 04 Jun 2012, 07:27 PM
Hi Starry,

in order for you to see the RadListBox control you have to make sure you have the proper references in your project. For the RadListBox you need to leverage the Telerik.Windows.Controls library.

To help you along, go to this documentation to get started using the control.

You can add it in your xaml using
<telerik:RadListBox />

or

you can add it programmatically from the code behind using this method
RadListBox StarrysRadListBox = new RadListBox();

Good Luck!
Lancelot
0
George
Telerik team
answered on 05 Jun 2012, 03:24 PM
Hi Starry,

Please, note that the RadListBox control is available in RadControls since Q1 2012 as beta, and it will be officially introduced with the upcoming Q2 2012 release.

Regards,
George
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Starry
Top achievements
Rank 1
answered on 06 Jun 2012, 05:02 AM
Thanks  a  lot...
    But, Why  the  "Listbox  controls"   in  2010 Q2  there is  such  serious   bug...   Not  good   than  the listbox  in  silverlight  toolkit...
Tags
ListBox
Asked by
Starry
Top achievements
Rank 1
Answers by
George
Telerik team
Starry
Top achievements
Rank 1
Lancelot
Top achievements
Rank 1
Share this question
or