0
我的數據網格在我的WPF
解決方案中,其數據源是ICollectionView
。但在onclick中,我想查找數據源的System.type。我怎樣才能找到ICollectionView
數據源獲得ICollectionView數據類型
我的數據網格在我的WPF
解決方案中,其數據源是ICollectionView
。但在onclick中,我想查找數據源的System.type。我怎樣才能找到ICollectionView
數據源獲得ICollectionView數據類型
的元素類型你可以這樣做
(this.yourGridName.ItemsSource as ICollectionView).SourceCollection.AsQueryable().ElementType == typeof(your_system_type)
由於它的工作.. – user3706084