我正在使用 DevExpress TreeListControl:
void TreeListView_FocusedRowChanged(object sender, FocusedRowChangedEventArgs e) {
string val;
PropertyInfo[] properties = e.NewRow.GetType().GetProperties();
foreach (PropertyInfo item in properties) {
string x = item.Name;
if (x == "Id") {
var barProperty = item.GetType().GetProperty("Id");
if (barProperty != null) {
object[] obj = new Object[0];
val = item.GetValue(sender, obj) as string;
}
}
}
}
如何获取选定的行值?