Hello
my requirement is to put three controls in one column of Kendo grid()
1st two Controls are a dropdown list and 3rd control is numeric field with will have value like '0000.0000345'
here is my column code looks like
columns.Bound(o => o.MicGreaterLess).Title("MIC").Width(175).Encoded(false).ClientTemplate(
@Html.Kendo().DropDownList()
.Name("MICGreaterLess")
.DataTextField("Text")
.DataValueField("Value")
.Value("1")
.BindTo(
new List<SelectListItem>(){ new SelectListItem() { Text = "=", Value = "1" },
new SelectListItem() { Text = "<", Value = "2" },
new SelectListItem() { Text = ">", Value = "3" }
})
.HtmlAttributes(new { Style = "width:20px;" })
.ToClientTemplate()
.ToHtmlString()
+ " " +
@Html.TextBox("UOM", "uom", new { Style = "width:50px;" }).ToHtmlString()
+ " " +
@Html.TextBox("Value", "value", new { Style = "width:50px;" }).ToHtmlString()
).HtmlAttributes(new { Style = "vertical-align:top" });
after this all I see in the grid is three text boxs with the value 1, 'UOM', 'Value' (I need to see the drop down for 1st two controls)
and when the user selects I should be able to save these values in db.
please help - thanks in adv.
my requirement is to put three controls in one column of Kendo grid()
1st two Controls are a dropdown list and 3rd control is numeric field with will have value like '0000.0000345'
here is my column code looks like
columns.Bound(o => o.MicGreaterLess).Title("MIC").Width(175).Encoded(false).ClientTemplate(
@Html.Kendo().DropDownList()
.Name("MICGreaterLess")
.DataTextField("Text")
.DataValueField("Value")
.Value("1")
.BindTo(
new List<SelectListItem>(){ new SelectListItem() { Text = "=", Value = "1" },
new SelectListItem() { Text = "<", Value = "2" },
new SelectListItem() { Text = ">", Value = "3" }
})
.HtmlAttributes(new { Style = "width:20px;" })
.ToClientTemplate()
.ToHtmlString()
+ " " +
@Html.TextBox("UOM", "uom", new { Style = "width:50px;" }).ToHtmlString()
+ " " +
@Html.TextBox("Value", "value", new { Style = "width:50px;" }).ToHtmlString()
).HtmlAttributes(new { Style = "vertical-align:top" });
after this all I see in the grid is three text boxs with the value 1, 'UOM', 'Value' (I need to see the drop down for 1st two controls)
and when the user selects I should be able to save these values in db.
please help - thanks in adv.