Exemplo n.º 1
0
        public GriddlySettings Button(string argument, string caption, string icon = null, GriddlyButtonAction action = GriddlyButtonAction.Navigate, bool?enableOnSelection = null, string className = null, string target = null, string[] rowIds = null, object htmlAttributes = null)
        {
            if (enableOnSelection == null)
            {
                enableOnSelection = (action == GriddlyButtonAction.Ajax || action == GriddlyButtonAction.AjaxBulk || action == GriddlyButtonAction.Post);
            }

            var button = new GriddlyButton(className)
            {
                Argument          = argument,
                Text              = caption,
                Icon              = icon,
                Action            = action,
                EnableOnSelection = enableOnSelection.Value,
                Target            = target,
                RowIds            = rowIds
            };

            if (htmlAttributes != null)
            {
                button.HtmlAttributes = HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes);
            }

            return(Add(button));
        }
Exemplo n.º 2
0
 public GriddlyButton Add(GriddlyButton item)
 {
     Buttons.Add(item);
     return this;
 }
Exemplo n.º 3
0
        public GriddlySettings Add(GriddlyButton button)
        {
            Buttons.Add(button);

            return(this);
        }
Exemplo n.º 4
0
 public GriddlyButton Add(GriddlyButton item)
 {
     Buttons.Add(item);
     return(this);
 }