Ive been working off this demo
http://demos.telerik.com/aspnet-mvc/treeview/remote-data-binding
And I can populate my treeview without any problems
Ive been trying to get the value of a textbox
<input type="text" class="form-control" id="searchString" placeholder="Leit" value="" size="50" onkeypress="if (event.which == 13) { $('treeview').getTreeView().dataSource.read(); }">
as you can see the textbox is called searchString
this is my treeview in my cshtml file
@(Html.Kendo().TreeView()
.Name("treeview")
.TemplateId("treeview-template")
.DataSource(source =>
{
source.Read(read => read.Action("Read_TemplateData", "Home", new { searchString = "" })) ;
})
)
I dont quite know how to get the contents of that textbox into the searchString = since I usually do this by doing + $('searchString').val() which just concatenates the value on the end of the url.
the read_templateData is also the "standard" action.
I would like to be able to enter a searchtext in the searchbox and only return lines where the .text field contains what is in the searchString textbox. So I would use the .contains(searchString) of a list server side.
any ideas ?
Regards,
Emil