Listbox control can't choose one of the items.

6 posts, 0 answers
  1. Starry
    Starry avatar
    59 posts
    Member since:
    Apr 2012

    Posted 28 May 2012 Link to this post

    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;
            } 

  2. George
    Admin
    George avatar
    1332 posts

    Posted 29 May 2012 Link to this post

    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 >>

  3. DevCraft banner
  4. Starry
    Starry avatar
    59 posts
    Member since:
    Apr 2012

    Posted 31 May 2012 Link to this post

    Thanks  a  lot...
             But  there is  no  "RadListBox "    in  my  "RadControls  for  silverlight"  Toolkit....
             The Version  is  2010  Q2...   Where  is  the  control???
  5. Lancelot
    Lancelot avatar
    251 posts
    Member since:
    Jul 2012

    Posted 04 Jun 2012 Link to this post

    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
  6. George
    Admin
    George avatar
    1332 posts

    Posted 05 Jun 2012 Link to this post

    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 >>

  7. Starry
    Starry avatar
    59 posts
    Member since:
    Apr 2012

    Posted 06 Jun 2012 Link to this post

    Thanks  a  lot...
        But, Why  the  "Listbox  controls"   in  2010 Q2  there is  such  serious   bug...   Not  good   than  the listbox  in  silverlight  toolkit...
Back to Top
DevCraft banner