We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

syncfusion GridComboBoxColumn Binding to a List


Am working on Syncfusion WinRT, I hope to have a Grid Column with Combo Box to be Bound on List -  from an SQLite Datasource


  private async Task LoadGender()

           genderList.Add(new Gender { GenderCode = "M", GenderName = "Male" });
           genderList.Add(new Gender { GenderCode = "F", GenderName = "Female" });


           foreach (Gender item in genderList)
               await oGenderRepository.InsertGenderAsync(item);

           List<Gender> result = await oGenderRepository.SelectAllGenderAsync();
           //or parse a query
           //List<Employee> result = await oEmployeeRepository.SelectEmployeesAsync("SELECT EmployeeId, FirstName, LastName, Email, DepartmentId FROM Employee");

           genderList = result;

         //  this.cboGender.ItemsSource = result;


the xaml code is


        <Grid:SfDataGrid x:Name="dgUserAccounts" HorizontalAlignment="Left" Height="390" Margin="171,140,0,0" VerticalAlignment="Top" Width="1042" Background="White"  HeaderStyle="{StaticResource headerCellStyle}" AllowEditing="True" AutoGenerateColumns="False" NavigationMode="Cell" ColumnSizer="Star" RowSelectionBrush="#FFA7DFF1" CurrentCellBorderBrush="DeepSkyBlue" >
                <Grid:GridTextColumn HeaderText="User Name" MappingName="UserName"  Width="240" CellStyle="{StaticResource customCellStyle}" />
                <Grid:GridTextColumn  HeaderText="First Name" MappingName="FirstName" Width="200" CellStyle="{StaticResource customCellStyle}"/>
                <Grid:GridTextColumn  HeaderText="Last Name" MappingName="LastName" Width="200" CellStyle="{StaticResource customCellStyle}"/>
                <Grid:GridComboBoxColumn x:Name="cboGender"  HeaderText="Gender" MappingName="Gender" Width="200" CellStyle="{StaticResource customCellStyle}" DisplayMemberPath="GenderName" SelectedValuePath="GenderCode"  ItemsSource="{Binding genderList}"    />
                <Grid:GridTextColumn  HeaderText="Password" MappingName="Password" Width="200" CellStyle="{StaticResource customCellStyle}"/>
                <Grid:GridTextColumn MappingName="UserAccountCode" IsHidden="True"   />




3 Replies

NJ Narayanasamy J Syncfusion Team November 12, 2013 07:12 AM UTC

Hi Joseph,


Thanks for using Syncfusion Products.


We have analyzed your query. You need to specify the Source Property for Binding in GridComboBoxcolumn.ItemsSource property, explicitly to meet your requirement.

Based on your requirement, we have prepared a simple sample and it can be downloaded from the following location.


Sample: ComboBox.zip


Please let us know if you require further assistance on this.




DT Daniel Thompson September 15, 2014 04:41 PM UTC


Can you make this sample available for download please? When clicking on your link I get 

<Message>Access Denied</Message>


JG Jai Ganesh S Syncfusion Team September 16, 2014 11:12 AM UTC

Hi Daniel,


Sorry for the inconvenience caused.


The sample for the previous update is downloaded from the following location,


Sample: http://www.syncfusion.com/downloads/support/directtrac/129504/ComboBox-690268664.zip


Please let us know if this sample helps you.


Thank you,

Jai Ganesh S

Live Chat Icon For mobile
Up arrow icon