Pass Format info from custom SDataGridColumn to custom SDataGridCell


#1

I have a table description coming from the server with format hints for each column. I subclassed the DataGridColumn class to be able to store this format info. When rendering the cells, how can I get the render information from the column that they belong to?

FormattedGridColumn = new FormattedGridColumn (column.label, column.property, typeof(CheckCell), typeof(SDataGridHeaderCell));

if (StringUtils.IsEmpty (column.formatMaskType)) {
                        standardColumn.FormatType = column.formatMaskType;
                        standardColumn.FormatMask = column.formatMask;
                    }


#2

I found a solution, in my SDataGridDataSourceHelperDelegate subclass, in the PopulateCell method, I can get the column with this line:

FormattedGridColumn col = gridCell.Coordinate.Column as FormattedGridColumn;