I am trying to implement an inline editor inside each item of a TreeView widget.
TreeView initialization:
01.
@(Html.Kendo()
02.
.TreeView()
03.
.Name(
"treeview"
)
04.
.TemplateId(
"treeview-template"
)
05.
.Items(it1 =>
06.
{
07.
it1.Add().Id(
"1"
).Text(
"Test1"
)
08.
.Items(it2 =>
09.
{
10.
it2.Add().Id(
"2"
).Text(
"Test2"
);
11.
});
12.
})
13.
)
TreeView template:
1.
<script id=
"treeview-template"
type=
"text/kendo-ui-template"
>
2.
#var id = 'editor_' + item.id;#
3.
@(Html.Kendo()
4.
.Editor()
5.
.Name(
"#=id#"
)
6.
.Value(
"#=item.text#"
)
7.
.ToClientTemplate())
8.
</script>
But when I click on an item, the editor is not opening. The click just selects the TreeView item.
When I add a click listener in javascript to the editor instance and call "...date('kendoEditor').toolbar.show()",
I get the toolbar but no focus, and when I set the focus manually its always at the beginning of the text.
It seems that some events on the TreeView are preventing the inline edit event (i.e. the 'select' event of the TreeView?).
Another example: http://demos.telerik.com/aspnet-core/treeview/index add a "contenteditable=true" to any item and try to click it. The cursor appears for a second and then the item loses focus.
Do you think there is any possibility to get this working?
Hello,
I tried to create a TreeView with a custom ClientTemplate to instanciate an editor for each
Example (I just broke it down to the required settings):
01.
@(Html.Kendo().TreeView()
02.
.Name(
"treeview"
)
03.
.TemplateId(
"treeview-template"
)
04.
.Items(it1 =>
05.
{
06.
it1.Add().Id(
"1"
).Text(
"Test1"
)
07.
.Items(it2 =>
08.
{
09.
it2.Add().Id(
"2"
).Text(
"Test2"
);
10.
});
11.
})
12.
)
1.
<script id=
"treeview-template"
type=
"text/kendo-ui-template"
>
2.
@(Html.Kendo().Editor()
3.
.Name(
"editor_#=item.id#"
)
4.
.Value(
"#=item.text# #=item.id#"
)
5.
.ToClientTemplate())
6.
</script>
In the browser console I get the script error "Error: Invalid template: ...". As soon as I remove the #=item.id# in the .Name-function, it is working, but I have a name conflict with multiple instances (therefore I need the id inside the name). The same error occurs if I try .Name("editor_#=item.text#"). The value output of text and id is correct. Is this a bug in the editor widget or what am I doing wrong?
Hello,
I 'm have a view based on a ViewModel. This View Model has one Complex Property which is a collection.
public class ParentViewModel
{
public int Id { get; set; }
public int Description { get; set; }
public List<SecurityListViewModel> secList { get; set; }
}
}
Hi Guys,
i Have Problem with binding:
If I use this :
.BindTo((System.Collections.IEnumerable)ViewData["Analyten"])
it's work but if I us this:
.BindTo((SelectList)ViewData[ViewData.TemplateInfo.GetFullHtmlFieldName("") + "_Data"])
it does not work
Have you any idea ?
Thank you
@model Delphi.ViewModels.VMAnalytCRUD
@(
Html.Kendo().DropDownListFor(m => m.AnalytId)
.BindTo((System.Collections.IEnumerable)ViewData["Analyten"])
// .BindTo((SelectList)ViewData[ViewData.TemplateInfo.GetFullHtmlFieldName("") + "_Data"])
.DataTextField("AnalytName")
.DataTextField("AnalytNummer")
.DataValueField("AnalytId")
.Template("#= AnalytNummer # - #= AnalytName #")
.ValueTemplate("#= AnalytNummer # - #= AnalytName #")
.Filter(FilterType.Contains)
.AutoBind(false)
)
Hello,
first of all the "UI for ASP.NET Core Forum" has no category for "Dialog", so I post my request here.
I tried to implement the dialog with help of the TagHelper as described here http://demos.telerik.com/aspnet-core/dialog/tag-helper. But I found no way to implement some action buttons, as I can do with the C# Razor Helper. I also found this page http://docs.telerik.com/aspnet-core/helpers/dialog but under the tab "tagHelper" there is some strange tag-format with ":" which is not working.
I found that ServerFiltering is not working out of the box if you set Custo() in datasorce
Like in this example
http://demos.telerik.com/aspnet-mvc/autocomplete/grouping
This is about AutoComplete control. And text send to server via onAdditionalData Function
How I need to do same for DropDownList.
my solution to access filter text input is
function onAdditionalData() {
return {
text: $("#Course").data("kendoDropDownList").filterInput[0].value
};
}
Looks a bit awkward for me
Can team please explain what if better way here
I have a RadGrid with 5 columns and 3 of them have an ItemTemplate and EditItemTemplate, both having a control inside (Label and CheckBox, Label and RadDatePicker, Label and RadCombobox).
I have an issue when i click on the ckeckbox, i need to disable the RadDatePicker which is in another column but i cant find it.
I tried to use FindControl to search for the control that i need but always gets me the first founded and if the row that i have selected is not the first one, the control is not the one that i want.
var control = RadGrid1.FindControl(RadGrid1.MasterTableView.ClientID + "_Column3");
I tried also, browsing on the list of items that have my RadGrid and when i search for the control that i want, returns a null.
foreach (GridDataItem item in RadGrid1.Items)
{
var ctl = item.FindControl(RadGrid1.MasterTableView.ClientID + "_Column3");
if (ctl == null) continue;
}
I dont know what am i doing wrong or if i am missing something but i hope that you could help me.
Instead of the built in arrow to open a details table view for a row (like in attachment 1)
We want to do it with a button but not in the same location we will have an extra column for the button (somewhat like attachment 2). We are trying to match an existing UI.
The Master/Details grid is bound via code and that is all working properly.
How or what event should I use?
Hello,
If I use the following grid with columns.AutoGenerated(true) then no column headers are shown (why?) if there are no records available!
As a result the "No records" info is on top and there is a gap between navigation/paging bar and the grid bottom (see attached picture)
robert