IDynamicGrid.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #define scrolling
  2. //#define newgrid
  3. using System;
  4. using System.Linq.Expressions;
  5. using System.Windows;
  6. using InABox.Core;
  7. namespace InABox.DynamicGrid
  8. {
  9. public interface IDynamicGrid
  10. {
  11. FluentList<DynamicGridOption> Options { get; }
  12. Thickness Margin { get; set; }
  13. DynamicGridColumns MasterColumns { get; }
  14. DynamicGridColumns VisibleColumns { get; }
  15. CoreTable Data { get; set; }
  16. CoreRow[] SelectedRows { get; set; }
  17. double RowHeight { get; set; }
  18. double HeaderHeight { get; set; }
  19. double FontSize { get; set; }
  20. void Refresh(bool columns, bool data);
  21. bool EditItems(object[] items, Func<Type, CoreTable> PageDataHandler = null, bool PreloadPages = false);
  22. bool DirectEdit(CoreTable data);
  23. event OnFilterRecord OnFilterRecord;
  24. event OnCreateItem OnCreateItem;
  25. void AddVisualFilter(string column, string value);
  26. event OnDefineFilter OnDefineFilter;
  27. event OnPrintData OnPrintData;
  28. event OnCustomiseColumns OnCustomiseColumns;
  29. event OnAfterReloadEventHandler OnAfterReload;
  30. int DesiredWidth();
  31. void ConfigureColumns(DynamicGridColumns columns /*, bool dolookups */);
  32. void AddHiddenColumn(string column);
  33. void UpdateRow<TType>(CoreRow row, string column, TType value, bool refresh = true);
  34. void UpdateRow<T, TType>(CoreRow row, Expression<Func<T, TType>> column, TType value, bool refresh = true);
  35. }
  36. }