public GridViewEventInfo( KnownEvents id, GridEventType type, GridEventDispatchMode dispatchMode) { this = new GridViewEventInfo(id, type, dispatchMode, false); }
protected virtual GridEventType GetEventInfo( GridPropertyChangedEventArgs property, out GridEventDispatchMode dispatchMode) { dispatchMode = GridEventDispatchMode.Send; return(GridEventType.UI); }
protected override GridEventType GetEventInfo( RadProperty property, out GridEventDispatchMode dispatchMode) { if (property != GridViewDataColumn.DataTypeProperty) { return(base.GetEventInfo(property, out dispatchMode)); } dispatchMode = GridEventDispatchMode.Send; return(GridEventType.Both); }
public GridViewEventInfo( KnownEvents id, GridEventType type, GridEventDispatchMode dispatchMode, bool critical) { this.id = id; this.type = type; this.dispatchMode = dispatchMode; this.critical = critical; }
protected virtual GridEventType GetEventInfo( RadProperty property, out GridEventDispatchMode dispatchMode) { dispatchMode = GridEventDispatchMode.Send; if (property == GridViewColumn.AllowGroupProperty) { return(GridEventType.Data); } return(property == GridViewColumn.FieldNameProperty || property == GridViewColumn.PinPositionProperty || property == GridViewColumn.ExpressionProperty ? GridEventType.Both : GridEventType.UI); }
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e) { base.OnPropertyChanged(e); if (e.Property == GridViewColumn.MinWidthProperty) { int minWidth = this.MinWidth; if (this.Width < minWidth && minWidth != 0) { this.Width = (int)Math.Round((double)minWidth / (double)this.DpiScale.Width); } } else if (e.Property == GridViewColumn.MaxWidthProperty) { int maxWidth = this.MaxWidth; if (this.Width > maxWidth && maxWidth != 0) { this.Width = (int)Math.Round((double)maxWidth / (double)this.DpiScale.Width); } } else if (e.Property == GridViewColumn.FieldNameProperty) { string newValue = (string)e.NewValue; this.fieldNameCache = newValue; if (!string.IsNullOrEmpty(newValue) && newValue.Contains(".")) { this.isFieldNamePath = true; } } GridEventDispatchMode dispatchMode = GridEventDispatchMode.Send; this.DispatchEvent(KnownEvents.PropertyChanged, this.GetEventInfo(e.Property, out dispatchMode), dispatchMode, (object)this.ownerTemplate, new object[1] { (object)e }); if (e.Property != GridViewColumn.WidthProperty) { return; } if (this.OwnerTemplate != null) { this.OwnerTemplate.BestFitQueue.Dequeue(this); } if (this.EventDispatcher == null) { return; } ColumnWidthChangedEventArgs args = new ColumnWidthChangedEventArgs(this.Index); this.EventDispatcher.RaiseEvent <ColumnWidthChangedEventArgs>(EventDispatcher.ColumnWidthChanged, (object)this, args); }
protected virtual void DispatchEvent( KnownEvents id, GridEventType type, GridEventDispatchMode dispatchMode, object originator, object[] arguments) { if (this.ViewTemplate == null) { return; } GridViewEventInfo eventInfo = new GridViewEventInfo(id, type, dispatchMode); GridViewSynchronizationService.DispatchEvent(this.ViewTemplate, new GridViewEvent((object)this, originator, arguments, eventInfo), false); }
protected virtual void OnPropertyChanged(PropertyChangedEventArgs args) { if (args.PropertyName == "PinPosition") { this.ViewInfo.PinnedRows.UpdateRow(this); } else if (args.PropertyName == "IsSelected") { MasterGridViewTemplate masterTemplate = this.ViewTemplate.MasterTemplate; if (masterTemplate != null && masterTemplate.SelectionMode == GridViewSelectionMode.FullRowSelect) { if (this.IsSelected) { masterTemplate.SelectedRows.BeginUpdate(); if (!masterTemplate.MultiSelect) { masterTemplate.SelectedRows.Clear(); } masterTemplate.SelectedRows.Add(this, true); masterTemplate.SelectedRows.EndUpdate(true); } else { masterTemplate.SelectedRows.Remove(this); } } } else if (args.PropertyName == "Height" || args.PropertyName == "MinHeight" || args.PropertyName == "MaxHeight") { RowHeightChangedEventArgs args1 = new RowHeightChangedEventArgs(this); this.ViewTemplate.MasterTemplate.EventDispatcher.RaiseEvent <RowHeightChangedEventArgs>(EventDispatcher.RowHeightChanged, (object)this, args1); } GridEventDispatchMode dispatchMode = GridEventDispatchMode.Send; this.DispatchEvent(KnownEvents.PropertyChanged, this.GetEventInfo(args as GridPropertyChangedEventArgs, out dispatchMode), dispatchMode, (object)null, new object[1] { (object)args }); if (this.PropertyChanged == null) { return; } this.PropertyChanged((object)this, args); }