RealTimeSourceExtensions.cs 522 B

12345678910111213141516171819
  1. using DevExpress.Data;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace Ips.Library.DxpLib
  8. {
  9. public static class RealTimeSourceExtensions
  10. {
  11. public static T GetRowCellValue<T>(this RealTimeProxyForObject source,string propName)
  12. {
  13. var propDescriptors = source.Content;
  14. var a = propDescriptors.Where(n => n.Key.Name == propName).FirstOrDefault();
  15. return (T)a.Value;
  16. }
  17. }
  18. }