DataGridViewComboBoxColumn

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lagarber
    New Member
    • Sep 2011
    • 2

    #1

    DataGridViewComboBoxColumn

    I have a DataGridViewCom boBoxColumn object in a Windows application. The user can only selecte the first item in the list - this is in the Windows 7 environment. When the application is run in the Windows XP environment, it will allow the user to select any item in the dropdown list - this is the desired result. Is this a bug in Windows 7?
  • Aimee Bailey
    Recognized Expert New Member
    • Apr 2010
    • 197

    #2
    I'm not sure i've seen this issue creep up before, but a good way of telling could be to instead use a DataGridTemplat eColumn, and see if it still gives you gip, here's a code snippet that works almost identical to the DataGridComboBo xColumn for you to try:

    Code:
    <DataGridTemplateColumn>
                        <DataGridTemplateColumn.CellEditingTemplate>
                            <DataTemplate>
                                <ComboBox ItemsSource="" DataContext="" Text="{Binding Path=}" />
                            </DataTemplate>
                        </DataGridTemplateColumn.CellEditingTemplate>
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Padding="5" Text="{Binding Path=}" />
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>
    Aimee.

    Comment

    Working...