public virtual CellWriter RadioBoxCell <T>(IHtmlHelper <T> helper, string field, string rowIndex, string property, bool asArray, string changeFunction, object cellAttributes, object inputAttr, string listItem, string classes)
        {
            var writer = new CellWriter(helper);

            writer.Initialize(null, null, cellAttributes, inputAttr, classes);

            string lItem = helper.GetModelName() + (listItem != null ? "." + listItem : null);
            string type  = "checkbox";

            if (asArray)
            {
                writer.InputModel.MemberName = writer.InputModel.NgModelName + ".Tag.selected";
            }
            else
            {
                type = "radio";
                writer.InputModel.MemberName            = writer.InputModel.NgModelName + "." + property;
                writer.InputModelExtraAttrs.calc__value = rowIndex;
            }

            writer.InputModel           = writer.InputModel.GetCheckInput(null, null, false, lItem, type);
            writer.InputModel.FieldName = "'" + field + "'";

            if (changeFunction != null)
            {
                writer.InputModelExtraAttrs.evnt__change = changeFunction;
            }
            else if (asArray)
            {
                writer.InputModelExtraAttrs.evnt__change = helper.GetModelName() + $".Tag.SelectOnly({property})";
            }
            return(writer);
        }
        public virtual CellWriter TextCell <T, TValue>(IHtmlHelper <T> helper, Expression <Func <T, TValue> > exp, string pipe, object cellAttributes)
        {
            using (var writer = new CellWriter(helper))
            {
                writer.UseExpression(exp);
                writer.Initialize(null, null, cellAttributes, null);

                pipe = pipe == null ? "" : " | " + pipe;
                if (pipe.Contains("translate"))
                {
                    writer.InputModel.NgModelName = "'Words.'+" + writer.InputModel.NgModelName;
                }

                writer.InputModel.MemberName += pipe;
                return(writer);
            }
        }
        public virtual CellWriter CheckBoxCell <T>(IHtmlHelper <T> helper, string field, string rowIndex, string listName, string ngModel, string changeFunction, object cellAttributes, object inputAttr, string listItem, string classes)
        {
            var writer = new CellWriter(helper);

            string lItem = helper.GetModelName() + (listItem != null ? "." + listItem : "");

            writer.Initialize(null, null, cellAttributes, inputAttr, classes);
            writer.InputModel            = writer.InputModel.GetCheckInput(null, null, false, lItem);
            writer.InputModel.MemberName = helper.GetModelName() + "." + ngModel;
            writer.InputModel.FieldName  = "'" + field + "'+" + rowIndex;
            helper.AddText(StringType.Word, field);
            if (changeFunction != null)
            {
                writer.InputModelExtraAttrs.evnt__change = changeFunction;
            }
            else if (listName != null)
            {
                writer.InputModelExtraAttrs.evnt__change = helper.GetModelName() + $".Tag.ApplyTo({listName})";
            }

            return(writer);
        }