0
我是Devexpress控件的新手。我已經使用實體添加了TreeList
控件。我想選擇的列值即ID如何在.NET中獲取選定的WPF Devexpress TreeList行?
在.XAML文件:
<dxg:TreeListControl Name="treeListContacts" ItemsSource="{Binding Data, Source={StaticResource EntityServerModeDataSource2}}" AutoPopulateColumns="True" HorizontalAlignment="Left" Margin="10,19,0,0" VerticalAlignment="Top" Height="317" Width="180" FocusableChanged="treeListContacts_FocusableChanged">
<dxg:TreeListControl.Columns>
<dxg:TreeListColumn FieldName="Company_ID" ReadOnly="True" Width="30" Visible="False"/>
<dxg:TreeListColumn FieldName="CompanyName" ReadOnly="True"/>
</dxg:TreeListControl.Columns>
<dxg:TreeListControl.View>
<dxg:TreeListView ShowTotalSummary="True"/>
</dxg:TreeListControl.View>
</dxg:TreeListControl>
這裏,現在我想選擇的公司ID? 幫助讚賞!謝謝!
對不起@DmitryG我已經在'FocusableChanged'事件中試過這段代碼,但它不會工作。錯誤:不包含'GetNodeValue'的定義:( – 2013-05-13 07:17:20
@SHEKHARSHETE您正在使用的是哪個版本?請確保'x:Name'與treelist視圖對齊 – DmitryG 2013-05-13 07:35:55
yes offcourse我正在使用'Name'請參閱標記我使用的是vs2012 ultimate和devexpress 12.2版本,當第一次加載頁面時,默認情況下如何防止行重點? – 2013-05-13 07:48:05