Ejemplo n.º 1
0
        private static void FormatStyle(Telerik.Web.UI.GridColumn column, CodeTorch.Core.GridColumn config)
        {
            TableItemStyle itemStyle = null;

            itemStyle = column.ItemStyle;
            FormatColumnItemStyle(config.ItemStyle, itemStyle);

            itemStyle = column.HeaderStyle;
            FormatColumnItemStyle(config.HeaderStyle, itemStyle);

            itemStyle = column.FooterStyle;
            FormatColumnItemStyle(config.FooterStyle, itemStyle);
        }
Ejemplo n.º 2
0
        public static GridEditCommandColumn GetEditColumn(RadGrid Grid, CodeTorch.Core.Grid GridConfig)
        {
            GridEditCommandColumn col = null;

            CodeTorch.Core.GridColumn editColumn = GridConfig.Columns.Where(c =>
                                                                            (
                                                                                (c is EditGridColumn)
                                                                            )
                                                                            )
                                                   .SingleOrDefault();

            if (editColumn != null)
            {
                int columnIndex = Enumerable.Range(0, GridConfig.Columns.Count).First(i => GridConfig.Columns[i] is EditGridColumn);
                col = (GridEditCommandColumn)Grid.MasterTableView.Columns[columnIndex];;
            }

            return(col);
        }
Ejemplo n.º 3
0
        public static void BuildGridColumn(BasePage page, RadGrid Grid, Grid GridObject, CodeTorch.Core.GridColumn Column, string ResourceKeyPrefix)
        {
            switch (Column.ColumnType)
            {
            case GridColumnType.BoundGridColumn:
                BuildGridBoundColumn(page, Grid, GridObject, (BoundGridColumn)Column, ResourceKeyPrefix);
                break;

            case GridColumnType.HyperLinkGridColumn:
                BuildGridHyperLinkColumn(page, Grid, GridObject, (HyperLinkGridColumn)Column, ResourceKeyPrefix);
                break;

            case GridColumnType.DeleteGridColumn:
                BuildGridDeleteColumn(page, Grid, GridObject, (DeleteGridColumn)Column, ResourceKeyPrefix);
                break;

            case GridColumnType.EditGridColumn:
                BuildGridEditColumn(page, Grid, GridObject, (EditGridColumn)Column, ResourceKeyPrefix);
                break;

            case GridColumnType.PickerLinkButtonGridColumn:
                PickerLinkButtonColumn(page, Grid, GridObject, (PickerLinkButtonGridColumn)Column, ResourceKeyPrefix);
                break;

            case GridColumnType.PickerHyperLinkGridColumn:
                BuildGridPickerHyperLinkGridColumn(page, Grid, GridObject, (PickerHyperLinkGridColumn)Column, ResourceKeyPrefix);
                break;

            case GridColumnType.BinaryImageGridColumn:
                BuildBinaryImageGridColumn(page, Grid, GridObject, (BinaryImageGridColumn)Column, ResourceKeyPrefix);
                break;
            }
        }