I am using the treeview in Angularjs 1.5
The treeview do not have a single Root node, but multiple Root nodes and i am trying to detect when i am dropping a node to the top level/Root without any luck.
See attacheched image.
Hello,
I have a tab stripe and the tab Content which is a grid bound to datatable gets loaded with Ajax call like this
@(Html.Kendo().TabStrip()
.Name("myKendoTabs")
.Animation(animation =>
{
animation.Enable(false);
})
.SelectedIndex(0)
.Items(t =>
{
t.Add().Text("Objektliste").LoadContentFrom("GetObjectsforAdress", "AdressActivity", new { strAdressID = ViewBag.SelAdressID });
})
)
And the GetObjectsforAdress method in Controller Returns a partial view
return PartialView("DocumentList", ds.Tables[0]);
and the partialview is like this
@(Html.Kendo().Grid(Model)
.Name("Grid_ObjActivity")
.Scrollable()
.HtmlAttributes(new { style = "height: 300px;" })
.DataSource(dataSource1 => dataSource1
.Ajax()
.PageSize(100)
.Model(model1 =>
{
if (Model != null)
{
foreach (System.Data.DataColumn ocolumn in Model.Columns)
{
model.Field(ocolumn.ColumnName, ocolumn.DataType);
}
}
})
.ServerOperation(false)
)
.Resizable(resize => resize.Columns(true))
.Columns(columns =>
{
if (ViewBag.ObjListHeader != null)
{
for (int j = 0; j < ViewBag.ObjListHeader.GetLength(0); j++)
{
columns.Bound(ViewBag.ObjListHeader[j, 0]).Title(ViewBag.ObjListHeader[j, 0]).Width(120);
}
}
})
.Selectable(selectable => selectable
.Mode(GridSelectionMode.Single))
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str.Clear()
.StartsWith("Starts with")
.IsEqualTo("Is equal to")
.IsNotEqualTo("Is not equal to")
))
)
.Groupable()
.Reorderable(r => r.Columns(true))
.Resizable(r => r.Columns(true))
)
The Problem is when the tab is selected then GetObjectsforAdress method is called twice. Loads once and again loads. Not sure why it is called twice.
Can you please suggest what am i doing wrong here.
Thanks
Anamika
<
div
data-role
=
"listview"
data-template
=
"list-template"
data-edit-template
=
"edit-template"
data-bind
=
"source: controls"
>
</
div
>
<
script
id
=
"list-template"
type
=
"text/x-kendo-template"
>
<
div
>
# if(data.ControlType === "TextBox") { #
<
h3
>#:Label#</
h3
>
<
input
type
=
"text"
data-bind
=
"value: PropertyName"
class
=
'k-textbox'
disabled
=
"disabled"
/>
# } else if(data.ControlType === "DateTime"){ #
<
h3
>#:Label#</
h3
>
<
input
type
=
"text"
data-bind
=
"value: PropertyName"
data-role
=
"datetimepicker"
disabled
=
"disabled"
/>
# } else if(data.ControlType === "CheckBox"){ #
<
label
>
<
span
data-type
=
"CheckBox"
>
<
input
type
=
"checkbox"
disabled
=
"disabled"
>
</
span
>
#:Label#
</
label
>
# } #
<
a
class
=
"k-button k-button-icontext k-edit-button"
href
=
"\\#"
><
span
class
=
"k-icon k-edit"
></
span
></
a
>
<
a
class
=
"k-button k-button-icontext k-delete-button"
href
=
"\\#"
><
span
class
=
"k-icon k-delete"
></
span
></
a
>
</
div
>
</
script
>
<
script
id
=
"edit-template"
type
=
"text/x-kendo-template"
>
<
div
>
<
input
type
=
"text"
data-bind
=
"value: Label"
class
=
'k-textbox'
style
=
"width: 100px"
required
=
"required"
/>
<
br
/>
<
input
type
=
"text"
data-bind
=
"value: PropertyName"
class
=
'k-textbox'
required
=
"required"
/>
<
select
data-bind
=
"source: controlTypes, value: ControlType"
data-role
=
"dropdownlist"
></
select
>
<
br
/>
<
div
class
=
"edit-buttons"
>
<
a
class
=
"k-button k-button-icontext k-update-button"
href
=
"\\#"
><
span
class
=
"k-icon k-update"
></
span
>Update</
a
>
<
a
class
=
"k-button k-button-icontext k-cancel-button"
href
=
"\\#"
><
span
class
=
"k-icon k-cancel"
></
span
>Cancel</
a
>
</
div
>
</
div
>
</
script
>
How do I set the date-format of a pie chart with mvvm?
I would like a result like this(attached file)
I have a pie chart. This is the code:
<
div
data-role
=
"chart"
data-legend
=
"{ position: 'bottom' }"
data-series-defaults
=
"{ type: 'column' }"
data-category-axis="{
field: 'name',
}"data-value-axis="[
{ name: 'name'},
]"
data-series-colors
=
"['#DDDDDD','#FFFF00','#FF0000','#00CC00']"
data-series="[
{ field: 'doc1', name: 'doc', labels: {visible: true} },
{ field: 'doc2', name: 'doc', labels: {visible: true} },
{ field: 'doc3', name: 'doc', labels: {visible: true} },
{ field: 'doc4', name: 'doc', labels: {visible: true} }
]"data-bind="source: DocSource,
events: { seriesHover: onSeriesHover }"></
div
>
I wuold like set data with '%' using MVVM of kendo
I have an MVC grid where I have a Save event defined as follows:
.Events(events => events.Change("gridRowChange").Edit("onEdit").Save("onSave"))
In my JavaScript code I have an onSave(e) function defined that never gets called when a grid item is saved.
I should also point out that all grid rows in this page are saved manually via a JS function containing the following line.
$("#grid").data("kendoGrid").saveRow();
I saw in another thread from several years ago that someone else was having the same issue doing what I'm doing but I never saw a resolution.
I am trying to get Font Awesome icons to display in my custom editor tool. The example I found here: http://docs.telerik.com/kendo-ui/controls/editors/editor/how-to/appearance/add-icon-custom-tool no longer works. We are using version 2016.3.1118 and although the example is broken in both that version and the latest release, they do display different behavior so please provide an update to the example for version 2016.3.1118. Thanks!
I am trying to create a master/detail grid using this example Kendo Dojo. It seemed to work fine as both grids are receiving data. However, when I expand the detail grid the rows do not display. If you see the example below, TagID #1 has a record count of 1 detail row that should display but it doesnt'. It only shows like a white space, whereas TagID #22 which does not have any detail records shows a record count of 0 and a completely empty grid.
Here is my HTML:
<div kendo-grid="tagsGrid" options="tagsGridOptions">
<div k-detail-template>
<kendo-tabstrip>
<ul>
<li class="k-state-active">Tagged Contractors</li></ul>
<div>
<div kendo-grid k-options="detailGridOptions(dataItem)"></div>
</div></kendo-tabstrip></div>
</div>
Here is my Angular Controller Code for the detail grid:
$scope.detailGridOptions = function (dataItem)
{return
{ dataSource:
{ type: 'aspnetmvc-ajax', transport:
{ read: "/Home/GetTaggedContractorsByMajor"},
serverPaging: true,
serverSorting: true,
serverFiltering: true,
pageSize: 5,
filter: { field: "TagID", operator: "eq", value: dataItem.TagID },
schema: { data: "Data", total: "Total"}},
scrollable: false,
sortable: true,
pageable: true,
columns: [{ field: "CompanyID", title: "CompanyID"},{ field: "vchCompanyName", title: "Company Name"}]};};
I didn't include the code for the master grid for brevity, but if anyone feels they need it in order to help, I will gladly add it.