iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I have a combo box with default properties
I try to bind to a DataTable like this in code:
Private _DataForCombo As New DataTable
With _DataForCombo.Columns .Add("id", GetType(Integer)) .Add("name", GetType(String)) End With _DataForCombo.AcceptChanges() _DataForCombo.Rows.Add(0, "My Lvo") _DataForCombo.Rows.Add(1, "My Lvo3") _DataForCombo.AcceptChanges()End With UXComboBox1.DisplayMemberPath = "name" UXComboBox1.SelectedValuePath = "id" UXComboBox1.GetSelectedItem() UXComboBox1.ItemsSource = _DataForCombo.AsDataView Now when I expand I DataRowView text instead of my descriptions, if I select it show correctly.Do I have to use ItemTemplate? Thanks
With _DataForCombo.Columns .Add("id", GetType(Integer)) .Add("name", GetType(String)) End With _DataForCombo.AcceptChanges() _DataForCombo.Rows.Add(0, "My Lvo") _DataForCombo.Rows.Add(1, "My Lvo3") _DataForCombo.AcceptChanges()
End With
UXComboBox1.DisplayMemberPath = "name" UXComboBox1.SelectedValuePath = "id" UXComboBox1.GetSelectedItem() UXComboBox1.ItemsSource = _DataForCombo.AsDataView Now when I expand I DataRowView text instead of my descriptions, if I select it show correctly.Do I have to use ItemTemplate? Thanks
UXComboBox1.DisplayMemberPath = "name" UXComboBox1.SelectedValuePath = "id" UXComboBox1.GetSelectedItem() UXComboBox1.ItemsSource = _DataForCombo.AsDataView
Now when I expand I DataRowView text instead of my descriptions, if I select it show correctly.
Do I have to use ItemTemplate?
Thanks
Sorry my bad I corrected my code and it works fine
Sorry
This behavior is caused by a bug in the UXComboBox. By default, in your scenario the result box should also show the "name" field.
void MainWindow_Loaded(object sender, RoutedEventArgs e){ _DataForCombo.Columns.AddRange(new DataColumn[] { new DataColumn("ID", typeof(Int32)), new DataColumn("Name", typeof(string)) }); _DataForCombo.Rows.Add(0, "My Lvo"); _DataForCombo.Rows.Add(1, "My Lvo3"); _DataForCombo.AcceptChanges(); uXComboBox1.DisplayMemberPath = "Name"; uXComboBox1.SelectedValuePath = "ID"; uXComboBox1.ItemsSource = _DataForCombo.AsDataView(); uXComboBox1.ItemTemplate = (DataTemplate)this.Resources["ContactViewTemplate"];}
Item template snippet:
<Window.Resources> <DataTemplate x:Key="ContactViewTemplate"> <Grid> <TextBlock Text="{Binding Name}"/> </Grid> </DataTemplate></Window.Resources>
Well unfortunately this has not being fixed on the RTM build
This should have been fixed as our support has the test case that confirms the fix of each submitted issue. Let's hear the test result from our support on Monday.
Thanks!
Based on my test with the RTM build of ClientUI, with the original snippet you posted on the first post the UXComboBox already show the name field in the dropdown result box.
Any chance that RTM build did not remove old components how can I check.
What are the RTM version on assemblies so I can check my peroject
Yiannis,
The RTM build has the file assembly version set to 3.0.5000.8, which is consistently set to all assemblies.
To check the assembly version, go to Windows Explorer, bring up the Properties of the assembly, then check the File Version field.
Note: Do not check the version in VS 2010, since it's displaying the assembly version, not assembly file version.
Hope this helps,Jimmy.
Well it still does not work form me and the assemblies are the correct version. Does it matter that I have placed combo on a toolbar
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname