Wednesday, March 23, 2011

WPF Multicolumn ComboBox

In WPF Multicolumn ComboBox we can easily complete it By the following procedure:
Modify your Combobox maml as following:

================XAML  Binding ===============

 <ComboBox Height="23" HorizontalAlignment="Left" Margin="87,7,0,0" Name="ZoneBranchIDcomboBox" VerticalAlignment="Top" Width="160" >  
               <StackPanel Orientation="Horizontal">  
                 <TextBlock Text="{Binding ZoneBranchId}" Width="60"/>  
                   <TextBlock Text="|"/>  
                 <TextBlock Text="{Binding ZoneBranchName}" Width="60"/>  

==========Your UI Code for Load ComboBox:=========

 private void LoadBranchIDComboBox()  
 listOfZone = ObjBZoneSetup.GetAllBranchID();  
 foreach (EZoneSetup floorSetupObj in listOfZone)  
 ZoneBranchIDcomboBox.ItemsSource = listOfZone;  

=============== Business Logic============
 public List GetAllBranchID()  
 List listOfZoneBranchID = ObjZoneDAL.GetAllBranchID();  
 return listOfZoneBranchID;  

============== GateWay:=============
 public List GetAllBranchID()  
 List listOfBranchID = new List();  
 foreach (var ZoneSetup in objDataContext.SP_GET_BRANCH_NAME())  
 EZoneSetup eZoneSetupobj = new EZoneSetup();  
 eZoneSetupobj.ZoneBranchId = ZoneSetup.WI_ID;  
 eZoneSetupobj.ZoneBranchName = ZoneSetup.WI_NAME;  
 catch (Exception exception)  
 throw exception;  
 return listOfBranchID;  


vfpoledeb.1 provider is not registered on the local machine

Have u Install VFP Ole DB Provider in your System ? If No then Please Install it from following link.