首页 新闻 会员 周边 捐助

如何获取WPF下的TreeListView

0
悬赏园豆:10 [已关闭问题] 关闭于 2017-03-18 18:58

大家好,请问下如何获取到treeListView,代码如下,无法通过Name="treeListView"获取到,请问下cs文件中如何获取到Name="treeListView"这个控件呢,谢谢

 1  <Grid>
 2         <dxg:LookUpEdit x:Name="editor" AutoPopulateColumns="False" DisplayMember="Name"  ValueMember="ID" HorizontalAlignment="Center" VerticalAlignment="Center" Width="350" IsTextEditable="False">
 3             <dxg:LookUpEdit.PopupContentTemplate>
 4                 <ControlTemplate>
 5                     <dxg:GridControl x:Name="PART_GridControl"> 
 6                         <dxg:GridControl.Columns>
 7                             <dxg:GridColumn FieldName="Name" />
 8                             <dxg:GridColumn FieldName="Position" />
 9                             <dxg:GridColumn FieldName="Department" />
10                         </dxg:GridControl.Columns>
11                         <dxg:GridControl.View>
12                             <dxg:TreeListView Name="treeListView" ShowAutoFilterRow="False" AutoWidth="True" ShowCheckboxes="True" AllowPerPixelScrolling="True"
13                                        KeyFieldName="ID" ParentFieldName="ParentID" SelectionChanged="TreeListView_SelectionChanged" NodeCheckStateChanged="TreeListView_NodeCheckStateChanged"/>
14                         </dxg:GridControl.View>
15                     </dxg:GridControl>
16                 </ControlTemplate>
17             </dxg:LookUpEdit.PopupContentTemplate>
18             <dxg:LookUpEdit.StyleSettings>
19                 <dxg:MultiSelectLookUpEditStyleSettings />
20             </dxg:LookUpEdit.StyleSettings>
21         </dxg:LookUpEdit>
22     </Grid>
五月℃夏到了的主页 五月℃夏到了 | 初学一级 | 园豆:17
提问于:2016-05-06 13:36
< >
分享
所有回答(1)
0

this.editor.Template.FindName("treeListView",this.ediotr) as TreeListView

jello chen | 园豆:7336 (大侠五级) | 2016-05-06 14:17
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册