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

Listbox control can't choose one of the items.

0 Answers 22 Views
General Discussions
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:13 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;
        }


Tanks  a  lot ...       Using  "Silverlight  Tookit   ListBox"   is  ok...

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Starry
Top achievements
Rank 1
Share this question
or