Inheritance: System.Windows.Controls.GridViewColumnHeader
Exemplo n.º 1
0
        public static void SetColumnAdorners(GridView gvResults, IList <OrderOption> orderOptions)
        {
            for (int i = 0; i < orderOptions.Count; i++)
            {
                OrderOption oo = orderOptions[i];

                var fullKey = oo.Token.FullKey();

                SortGridViewColumnHeader header = gvResults.Columns
                                                  .Select(c => (SortGridViewColumnHeader)c.Header)
                                                  .FirstOrDefault(c => c.RequestColumn.Name == fullKey);

                if (header != null)
                {
                    header.CreateAdorner(oo.OrderType, i);
                    oo.Header = header;
                }
            }
        }
Exemplo n.º 2
0
 public SortGridViewColumnHeaderAutomationPeer(SortGridViewColumnHeader header)
     : base(header)
 {
 }
Exemplo n.º 3
0
 public SortGridViewColumnHeaderAutomationPeer(SortGridViewColumnHeader header)
     : base(header)
 {
 }
Exemplo n.º 4
0
        FilterOption CreateFilter(SortGridViewColumnHeader header)
        {
            if (resultTable != null)
            {
                ResultRow row = (ResultRow)lvResult.SelectedItem;
                if (row != null)
                {
                    object value = row[header.ResultColumn];

                    return new FilterOption
                    {
                        Token = header.RequestColumn.Token,
                        Operation = FilterOperation.EqualTo,
                        Value = value is EmbeddedEntity ? null : value
                    };
                }
            }

            return new FilterOption
            {
                Token = header.RequestColumn.Token,
                Operation = FilterOperation.EqualTo,
                Value = FilterOption.DefaultValue(header.RequestColumn.Type),
            };
        }