首页 > 其他 > 详细

SearchControl控件使用研究

时间:2014-08-03 04:30:05      阅读:1235      评论:0      收藏:0      [点我收藏+]

 研究了一下DevExpress的SearchControl,供大家参考使用:

<dxe:SelectorEditColumnProvider x:Name="columnProvider" OwnerEdit="{Binding Path=., ElementName=treeList}"/>

                <dxe:SearchControl x:Name="searchControl" Margin="6 0 5 0" MinHeight="22" MinWidth="200" VerticalAlignment="Center"

                                   ColumnProvider="{Binding Path=., ElementName=columnProvider}" FilterByColumnsMode="Custom" SearchTextPostDelay="100"/>

 

 

<dxg:TreeListControl x:Name="treeList" Grid.Row="2" ItemsSource="{Binding Ships}" ShowBorder="False"

                               SelectionMode="{Binding SelectionMode}" FilterCriteria="{Binding FilterCriteria, ElementName=searchControl}">

                <dxg:TreeListControl.Columns>

                    <dxg:TreeListColumn FieldName="CameraID" VisibleIndex="0" Header="编码"/>

                    <dxg:TreeListColumn FieldName="Name" VisibleIndex="1" Header="名称"/>

                    <!--<dxg:TreeListColumn FieldName="FullName" UnboundType="String"

                                    UnboundExpression="[FirstName] + ‘ ‘ + [LastName]" VisibleIndex="1" ReadOnly="True" />

                    <dxg:TreeListColumn FieldName="City" VisibleIndex="2" />

                    <dxg:TreeListColumn FieldName="AddressLine1" Header="Address" VisibleIndex="3" />

                    <dxg:TreeListColumn FieldName="Phone" VisibleIndex="4" />-->

                </dxg:TreeListControl.Columns>

                <dxg:TreeListControl.TotalSummary>

                    <dxg:TreeListSummaryItem FieldName="CameraID" SummaryType="Count"/>

                </dxg:TreeListControl.TotalSummary>

                <dxg:TreeListControl.View>

 

                    <dxg:TreeListView x:Name="view"

                                  ParentFieldName="ParentID" KeyFieldName="NodeID"

                                  EditorShowMode="MouseUpFocused" AutoExpandAllNodes="True" NodeImageSelector="{StaticResource categoryImageSelector}"

                                  AutoWidth="True" ShowTotalSummary="True" ShowFilterPanelMode="Never" ShowNodeImages="True" ShowColumnHeaders="False" ShowIndicator="False" ShowHorizontalLines="False" ShowVerticalLines="False">

                

                    </dxg:TreeListView>

                </dxg:TreeListControl.View>

                <i:Interaction.Behaviors>

                    <dxg:TreeListDragDropManager x:Name="dragDropManager" AllowDrag="True" DragOver="dragDropManager_DragOver_1" DragElementTemplate="{StaticResource dragelementTemplate}">

                       

                    </dxg:TreeListDragDropManager>

                </i:Interaction.Behaviors>

            </dxg:TreeListControl>

 

this.columnProvider.CustomColumns = new ObservableCollection<string>() {"Name"};

SearchControl控件使用研究,布布扣,bubuko.com

SearchControl控件使用研究

原文:http://www.cnblogs.com/wuhaijing/p/3887863.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!