コード例 #1
0
ファイル: GridColumn.cs プロジェクト: dolani/CodeTorch
        private static void ConvertFromBoundGridColumn(BoundGridColumn current, GridColumn newColumn)
        {
            switch (newColumn.ColumnType)
            {
            case GridColumnType.BinaryImageGridColumn:
                ((BinaryImageGridColumn)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).DataTextFormatString  = current.DataFormatString;
                ((HyperLinkGridColumn)newColumn).DataNavigateUrlFields = current.DataField;
                break;

            case GridColumnType.PickerHyperLinkGridColumn:
                break;

            case GridColumnType.PickerLinkButtonGridColumn:
                ((PickerLinkButtonGridColumn)newColumn).DataField     = current.DataField;
                ((PickerLinkButtonGridColumn)newColumn).DataTextField = current.DataFormatString;
                break;
            }
        }
コード例 #2
0
ファイル: GridColumn.cs プロジェクト: dolani/CodeTorch
        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);
        }