Пример #1
0
        private static void ConvertFromBinaryImageGridColumn(BinaryImageGridColumn current, GridColumn newColumn)
        {
            switch (newColumn.ColumnType)
            {
            case GridColumnType.BoundGridColumn:
                ((BoundGridColumn)newColumn).DataField = current.DataField;
                break;

            case GridColumnType.DeleteGridColumn:
                ConvertToDeleteColumnDefaults(newColumn);
                break;

            case GridColumnType.EditGridColumn:
                ((EditGridColumn)newColumn).DataTextField = current.DataField;
                break;

            case GridColumnType.HyperLinkGridColumn:
                ((HyperLinkGridColumn)newColumn).DataTextField         = current.DataField;
                ((HyperLinkGridColumn)newColumn).DataNavigateUrlFields = current.DataField;
                break;

            case GridColumnType.PickerHyperLinkGridColumn:
                break;

            case GridColumnType.PickerLinkButtonGridColumn:
                ((PickerLinkButtonGridColumn)newColumn).DataField     = current.DataField;
                ((PickerLinkButtonGridColumn)newColumn).DataTextField = current.DataField;
                break;
            }
        }
Пример #2
0
        public static GridColumn GetNewColumn(string type)
        {
            GridColumn retval = null;

            switch (type.ToLower())
            {
            case "binaryimagegridcolumn":
                retval = new BinaryImageGridColumn();
                break;

            case "boundgridcolumn":
                retval = new BoundGridColumn();
                break;

            case "deletegridcolumn":
                retval = new DeleteGridColumn();
                break;

            case "editgridcolumn":
                retval = new EditGridColumn();
                break;

            case "hyperlinkgridcolumn":
                retval = new HyperLinkGridColumn();
                break;

            case "pickerhyperlinkgridcolumn":
                retval = new PickerHyperLinkGridColumn();
                break;

            case "pickerlinkbuttongridcolumn":
                retval = new PickerLinkButtonGridColumn();
                break;
            }

            return(retval);
        }