This question is locked. New answers and comments are not allowed.
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...
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...