Telerik.Web.Mvc.UI.GridActionColumnSerializer.Serialize C# (CSharp) Method

Serialize() public method

public Serialize ( ) : object>.IDictionary
return object>.IDictionary
        public override IDictionary<string, object> Serialize()
        {
            var result = base.Serialize();
            var commands = new List<IDictionary<string,object>>();

            column.Commands.Each(c =>
            {
                var command = new Dictionary<string, object>();

                FluentDictionary.For(command)
                    .Add("name", c.Name)
                    .Add("attr", c.HtmlAttributes.ToAttributeString(), () => c.HtmlAttributes.Any())
                    .Add("buttonType", c.ButtonType.ToString())
                    .Add("imageAttr", c.ImageHtmlAttributes.ToAttributeString(), () => c.ImageHtmlAttributes.Any());

                commands.Add(command);
            });

            if (commands.Any())
            {
                result["commands"] = commands;
            }

            return result;
        }
GridActionColumnSerializer