public override int GetItemHeight() { MyGridView view = this.View as MyGridView; if (view != null) { return(view.CustomColumnRowHeight); } return(base.GetItemHeight()); }
public virtual void StopDragObjectFromOutside() { MyGridView view = ActiveDragManager.View as MyGridView; view.LockDragDropEvents(); try { CancelDrag(); IsDraggingFromOutside = false; } finally { view.UnLockDragDropEvents(); } }
void gridView1_CustomDrawGroupRow(object sender, RowObjectCustomDrawEventArgs e) { GridGroupRowInfo rowInfo = e.Info as GridGroupRowInfo; if (rowInfo != null && rowInfo.Column.FieldName == "Rating") { MyGridView view = sender as MyGridView; MyGridViewInfo viewInfo = view.GetViewInfo() as MyGridViewInfo; int textWidth = viewInfo.CalcGroupRowTextWidth(e); RatingControlViewInfo info = rowInfo.Column.ColumnEdit.CreateViewInfo() as RatingControlViewInfo; RatingControlPainter painter = rowInfo.Column.ColumnEdit.CreatePainter() as RatingControlPainter; info.EditValue = view.GetGroupRowValue(e.RowHandle); info.CalcViewInfo(e.Graphics); info.Bounds = new Rectangle(textWidth, rowInfo.DataBounds.Y, info.RatingSize.Width, rowInfo.DataBounds.Height); info.CalcViewInfo(e.Graphics); ControlGraphicsInfoArgs args = new ControlGraphicsInfoArgs(info, e.Cache, rowInfo.DataBounds); e.DefaultDraw(); painter.Draw(args); e.Handled = true; } }