Current filter:
          You should refresh the page.
          Not Logged In

          How to Assign a ComboBox Editor to a Column

          0

          This example shows how to assign the combo box and spin editors to grid columns.

          You must  log in  or  register  to leave comments
          Select file
          • Window1.xaml
          • Window1.xaml.cs
          Select language
          • C#
          • VB.NET
          Select version
          • v2011 vol 1.4 - v2012 vol 1.2
          • v2010 vol 1.4 - v2011 vol 1.7
          • v2009 vol 2.4 - v2009 vol 3.7
          <Window x:Class="DXGrid_AssignComboBoxToColumn.Window1" 
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                  xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" 
                  xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" 
                  xmlns:local="clr-namespace:DXGrid_AssignComboBoxToColumn" 
                  Title="Window1" Height="300" Width="499">
              <Grid>
                  <dxg:GridControl x:Name="grid" ItemsSource="{x:Static local:NwindData.Data}">
                      <dxg:GridControl.Columns>
                          <dxg:GridColumn FieldName="ProductName" 
                                          EditSettings="{dxe:ComboBoxSettings DisplayMember=ProductName, ValueMember=ProductName, ItemsSource={x:Static local:NwindData.Data}}" />
                          <dxg:GridColumn FieldName="UnitPrice">
                              <dxg:GridColumn.EditSettings>
                                  <dxe:SpinEditSettings MaxValue="999" MinValue="1" />
                              </dxg:GridColumn.EditSettings>
                          </dxg:GridColumn>
                          <dxg:GridColumn FieldName="Discontinued" />
                      </dxg:GridControl.Columns>
                      <dxg:GridControl.View>
                          <dxg:TableView AutoWidth="True" />
                      </dxg:GridControl.View>
                  </dxg:GridControl>
              </Grid>
          </Window>