Exemplo n.º 1
0
        private static void ConvertFromPickerLinkButtonGridColumn(PickerLinkButtonGridColumn current, GridColumn newColumn)
        {
            switch (newColumn.ColumnType)
            {
            case GridColumnType.BinaryImageGridColumn:
                ((BinaryImageGridColumn)newColumn).DataField = current.DataTextField;
                break;

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

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

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

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

            case GridColumnType.PickerHyperLinkGridColumn:
                break;
            }
        }
Exemplo n.º 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);
        }