Example #1
0
        /// <summary>
        /// Defines a edit button.
        /// </summary>
        /// <returns></returns>
        public ImageButtonBuilder Edit()
        {
            var button = ImageButtonBuilder.GridEdit();

            Column.ButtonSet.Add(button);

            return(button);
        }
Example #2
0
        public GridCrudCommandsColumnBuilder <T> All()
        {
            templateColumnBuilder.HeaderTemplate(ImageButtonBuilder.GridAdd().ToHtmlString());
            templateColumnBuilder.ClientTemplate(ImageButtonSetBuilder.NewSet()
                                                 .Add(ImageButtonBuilder.GridEdit())
                                                 .Add(ImageButtonBuilder.GridDelete())
                                                 .ToHtmlString());
            rowCommandType = RowCommandType.All;

            return(this);
        }
Example #3
0
        public GridCrudCommandsColumnBuilder <T> Delete()
        {
            if (rowCommandType == null)
            {
                templateColumnBuilder.ClientTemplate(ImageButtonBuilder.GridDelete().ToHtmlString());
                rowCommandType = RowCommandType.Delete;
                return(this);
            }

            if (rowCommandType == RowCommandType.Edit)
            {
                templateColumnBuilder.ClientTemplate(ImageButtonSetBuilder.NewSet()
                                                     .Add(ImageButtonBuilder.GridEdit())
                                                     .Add(ImageButtonBuilder.GridDelete())
                                                     .ToHtmlString());
                rowCommandType = RowCommandType.All;
            }

            return(this);
        }