最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

devexpress - ComboBoxEdit in DevX WPF, added within the GridColumn's CellTemplate, displays the selected item of the Com

programmeradmin1浏览0评论

I am using the DevX WPF GridControl and ComboBoxEdit within a GridColumn's CellTemplate. For each row in the grid, there is a ComboBoxEdit with a selected item. Each ComboBox has its own ItemSource, which is retrieved from the corresponding row in the grid. When the grid has more rows and the vertical scrollbar is enabled, the selected item in the ComboBoxEdit appears in another ComboBox while scrolling.

I have disabled vertical scrolling and enabled the paging option in the grid view. I also tried setting VirtualizingPanel.IsVirtualizing="False", but none of these solutions have worked for me. Below is the code snippet and a sample link. DevX Version: 20.2

<dxg:GridControl ItemsSource="{Binding Orders}" Grid.Row="1" VirtualizingPanel.IsVirtualizing="False">
        <dxg:GridControl.Columns>
            <dxg:GridColumn FieldName="Name">
                <dxg:GridColumn.EditSettings>
                    <dxe:ComboBoxEditSettings ItemsSource="{Binding OrderNames}"
                                              ValueMember="ID" DisplayMember="Name"/>
                </dxg:GridColumn.EditSettings>
            </dxg:GridColumn>
            <dxg:GridColumn  FieldName="SuggestedBrokers" AllowEditing="true " Header="Suggested Brokers" Width="100"  HorizontalHeaderContentAlignment="Center"  >
                <dxg:GridColumn.HeaderStyle>
                    <Style  TargetType="{x:Type dxg:BaseGridHeader}">
                        <Setter Property="Background" Value="#CFEDF3"/>
                        <Setter Property="Foreground" Value="White" ></Setter>
                    </Style>
                </dxg:GridColumn.HeaderStyle>

                <dxg:GridColumn.CellTemplate>
                    <DataTemplate>
                        <dxe:ComboBoxEdit  Name="cboBrokers"  AllowNullInput="False" SelectedItem="" SelectedIndex="-1" SelectedText=""
                                           ItemsSource="{Binding Path=RowData.Row, Converter={dxs:StringToDatatableConverter}}" >
                            <dxe:ComboBoxEdit.StyleSettings>
                                <dxe:CheckedComboBoxStyleSettings />
                            </dxe:ComboBoxEdit.StyleSettings>
                        </dxe:ComboBoxEdit>
                    </DataTemplate>
                </dxg:GridColumn.CellTemplate>
            </dxg:GridColumn>
            <dxg:GridColumn FieldName="Amount"/>
        </dxg:GridControl.Columns>
        <dxg:GridControl.View>
            <dxg:TableView ShowTotalSummary="True"
                         VirtualizingPanel.IsVirtualizing="False"
                           FocusedRow="{Binding FocusedRow}">
            </dxg:TableView>
        </dxg:GridControl.View>
    </dxg:GridControl>

Sample link:

Anyone, please share your suggestion to resolve this.

Thanks,

Bharathi.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论