Exemplo n.º 1
0
        public static GridCellInfo GetCellInfo(this GridView view, int rowHandle, GridColumn col)
        {
            GridViewInfo viewInfo = view.GetViewInfo() as GridViewInfo;
            GridCellInfo ci       = viewInfo.GetGridCellInfo(rowHandle, col);

            if (ci == null)
            {
                return(null);
            }
            viewInfo.UpdateCellAppearance(ci);
            return(ci);
        }
Exemplo n.º 2
0
        AppearanceObject GetCellAppearance(int gridRowHandle, GridColumn gridColumn)
        {
            GridViewInfo viewInfo = view.GetViewInfo() as GridViewInfo;
            GridCellInfo cellInfo = viewInfo.GetGridCellInfo(gridRowHandle, gridColumn);

            if (cellInfo == null)
            {
                cellInfo = new GridCellInfo(new GridColumnInfoArgs(gridColumn), new GridDataRowInfo(viewInfo, gridRowHandle, view.GetRowLevel(gridRowHandle)), Rectangle.Empty);
            }
            MethodInfo me = viewInfo.GetType().GetMethod("UpdateCellAppearance", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.DeclaredOnly);

            if (me != null)
            {
                me.Invoke(viewInfo, new object[] { cellInfo, true });
            }
            viewInfo.UpdateCellAppearance(cellInfo);
            return(cellInfo.Appearance);
        }