lundi 8 août 2016

How to render checkbox with label on the side using w2uigrid

I tried using the render property but could not get it to my desired look. The code below renders a checkbox only but no label. I need it to have label depends on the text the model will supply. I need the column "Value" to have a dynamic text/caption on the side depending on what is being passed.

 @(Html.HeGridHelper("patternTable", "patternGrid").Show(new GridShow
            {
                ToolBar = true,
                Footer = false,
                ToolbarAdd = false,
                ToolbarDelete = false,
                ToolbarEdit = false,
                ToolbarSearch = false,
                ToolbarReload = false,
                ToolbarColumns = false,
                ToolbarSave = false,
                SelectColumn = false

            })

            .Columns(new List<GridColumn>()
            {

                    new GridColumn {Caption="ID", Field = "recid", Size = "0%", Hidden = true, Hideable = false, Sortable = false, Resizable = false },
                    new GridColumn { Caption ="", Field = "Value" , Min = 50, Size = "25%",  Editable = new EditableCheck {}},
                    new GridColumn { Caption = CommunityRes.Order, Field = "Order", Min = 50, Size = "25%",  Editable = new EditableText {  } , Render="<label> 'test'</label>"},
                    new GridColumn { Caption = CommunityRes.Suffix, Field = "Sfx", Min = 50, Size = "25%",  Editable = new EditableText {  } },

            }).ToHtmlString())




Aucun commentaire:

Enregistrer un commentaire