Hello
I have a treeview which is bound to remote dataset. LoadOnDemand is true so everytime a node is clicked read is called with id to load ist children.
Now i want to have serach box where text Input should filter the treeview to all Levels.
I tried this way
http://docs.telerik.com/kendo-ui/controls/navigation/treeview/how-to/filter-out-search-results
But it does not work as expected as i believe this methos is for loadondemand false.
Can you please suggest a way to make it work . I Need LoadOndemand true as i have 2000+ records in tree
Thanks
Anamika
I am having an issue on an inline editable grid with bulk edit on whereby when I click in the foreign key column I see a quick box and then it goes back to being uneditable - no dropdown as per the Editor template GridForeignKey. I have got this installed in my project.
What also seems to be happening is any integer columns aren't appearing with the styled edit box with the round edges. But I can click and edit the values.
Has anyone seen this before?
Even if I remove the Editor Template from the project the behaviour is the same, so I don't think its the editor template causing the issue!
I am on version 2016.3.914
Any help would be greatly appreciated
Hi,
We encounter a filtering issue in cascading dropdownlist. we have two dropdownlists and the value of dropdownlist is indicated from server.
After the 2nd dropdownlist display corresponding items according to the 1st dropwdownlist, we type some filter criteria in the 2nd dropdownlist textbox, the filtering function doesn't work.
We have attached the image below and please kindly assist. Thanks!
Currently I'm trying to access the value of a cell in the grid, but the property is always undefined.
@(Html.Kendo().Grid<IA.Models.PatientInfo>()
.Name("PatientGrid")
.Columns(columns =>
{
columns.Bound(c => c.PatientId).Title("Id").Width(50);
columns.Bound(c => c.FullName).Width(200);
columns.Bound(c => c.DOB).Width(140).Title("Date of Birth").Format("{0:dd/MM/yyyy}");
columns.Bound(c => c.MANumber).Width(90);
//columns.Command(command => { command.Destroy(); }).Width(50);
columns.Command(c => c.Custom("Delete").Click("open")).Width(50);
})
.Filterable()
.Sortable()
.Selectable()
.Pageable(pageable => pageable
.PageSizes(true)
.ButtonCount(5))
//.HtmlAttributes(new { style = "height: 80px" })
.Events(ev => ev.DataBound("function(){this.trigger('change')}"))
.DataSource(dataSource => dataSource
.Ajax()
.Destroy(update => update.Action("Destroy", "Provider"))
.Read(read => read.Action("Patient_Read", "Provider", new { id = Model.ProviderId }))
.PageSize(10)
.ServerOperation(false)
.Model(model =>
{
model.Id(m => m.PatientId);
})
)
)
<script type="text/javascript">
function open(e) {
e.preventDefault();
var row = $(e.currentTarget).closest("tr");
var test = row.PatientId;
alert(test);
}
</script>
I've also I've also tried using selectItem() and that doesn't seem to work either.
Hello,
In my JavaScript file I bind to serveral events of the grid like:
var
grid = $(
"#grdStandort"
).data(
"kendoGrid"
);
grid.bind(
"change"
,
function
() {
loadTabstripData(tabstrip.select().text());
});
tabstrip.bind(
"show"
,
function
() {
loadTabstripData(tabstrip.select().text());
});
this is working fine but now I want to bind to the "read" Event to set my parameters instead of using the .Data() property of the mvc grid (I don't want to set javascript in my grid Definition only want to bind/hook into Event from my external javscript file)
is there a event which I can bind to to set the parameters for the datasource?
robert
Hi there,
I have several Kendo charts (bar charts and line charts) with the data series bound to remote and grouped data. I am using the "shared" tooltip to display information on the grouped data together. However, I would like to change the width of the tooltip. I can of course do it globally by changing the Kendo chart tooltip CSS, but this is far from being a good solution because then it doesn't look good on other charts -- please see the enclosed jpg file.
Question: Is it possible to change the CSS definitions (in particular "width") of the chart tooltip separately for every single chart?
Any suggestions are welcome!
-------------------------------------------------------------
An example code below:
@(Html.Kendo().Chart<AmeyQCMVC2.Models.ViewModels.BCIRatiosViewModel>()
.Name("bciChart_DefectCategoryRatios")
.DataSource(ds => ds.Read(read => read.Action("GetDefectCategoryBCIRatios", "Report"))
.Group(group => group.Add(model => model.ConditionIndex))
.Sort(sort => sort.Add(model => model.DefectCategory))
)
.Theme("Fiori")
.Title("Component Condition Index per Defect Category")
.Legend(legend => legend
.Position(ChartLegendPosition.Right)
)
.ChartArea(chartArea => chartArea
.Margin(15)
)
.SeriesDefaults(seriesDefaults =>
seriesDefaults.Bar()
)
.SeriesColors("limegreen", "yellowgreen", "gold", "tomato", "red")
.Series(series =>
{
series.Bar(model => model.Ratio)
.Name("");
})
.CategoryAxis(axis => axis
.Categories(model => model.DefectCategory)
.MajorGridLines(lines => lines.Visible(true))
.MajorTicks(lines => lines.Visible(true))
)
.ValueAxis(axis => axis.Numeric()
.Title("Percentage of components")
.Min(0)
.Max(1)
.MajorGridLines(lines => lines.Visible(true))
.AxisCrossingValue(0)
.Labels(l => l.Format("{0:p0}"))
)
.Tooltip(tooltip => tooltip
.Visible(true)
.Shared(true)
.Format("{0:p2}")
.Color("white")
.Background("green")
.Border(1, "green")
)
.ToClientTemplate()
)
-------------------------------------------------------------
The viewmodel class is defined as follows:
public class BCIRatiosViewModel
{
public string DefectCategory { get; set; }
public int ConditionIndex { get; set; }
public double Ratio { get; set; }
}
I have a bar chart that is getting its data from my controller in the form of Json data as shown below:
[
{"SiteId":1,"Hour":9,"Quantity":9.0000,"Value":43.0500,"NumCustomers":5},
{"SiteId":1,"Hour":10,"Quantity":18.0000,"Value":43.6900,"NumCustomers":8},
{"SiteId":1,"Hour":11,"Quantity":7.0000,"Value":22.4200,"NumCustomers":3},
{"SiteId":1,"Hour":14,"Quantity":1.0000,"Value":1.0000,"NumCustomers":1}
{"SiteId":2,"Hour":9,"Quantity":10.0000,"Value":48.0500,"NumCustomers":7},
{"SiteId":2,"Hour":10,"Quantity":20.0000,"Value":83.6900,"NumCustomers":11},
{"SiteId":2,"Hour":11,"Quantity":9.0000,"Value":27.4200,"NumCustomers":5},
{"SiteId":2,"Hour":14,"Quantity":3.0000,"Value":11.0000,"NumCustomers":4}
{"SiteId":3,"Hour":9,"Quantity":7.0000,"Value":33.0500,"NumCustomers":4},
{"SiteId":3,"Hour":10,"Quantity":16.0000,"Value":35.6900,"NumCustomers":7},
{"SiteId":3,"Hour":11,"Quantity":7.0000,"Value":22.4200,"NumCustomers":3},
{"SiteId":3,"Hour":14,"Quantity":2.0000,"Value":5.0000,"NumCustomers":2}
]
As you can see, there are multiple sites for the same hours. The horizontal axis should represent each hour from the data. Each hour should have a column representing each site, very similar to the 'Column Chart' example on your site. The code example on the site shows the series data like this:
.Series(series => {
series.Column(new double[] { 3.907, 7.943, 7.848, 9.284, 9.263, 9.801, 3.890, 8.238, 9.552, 6.855 }).Name("India");
series.Column(new double[] { 4.743, 7.295, 7.175, 6.376, 8.153, 8.535, 5.247, -7.832, 4.3, 4.3 }).Name("Russian Federation");
series.Column(new double[] { 0.010, -0.375, 1.161, 0.684, 3.7, 3.269, 1.083, -5.127, 3.690, 2.995 }).Name("Germany");
series.Column(new double[] { 1.988, 2.733, 3.994, 3.464, 4.001, 3.939, 1.333, -2.245, 4.339, 2.727 }).Name("World");
})
My current code that shows the hourly totals for 1 site is listed below, but I'd like this to work for multiple sites as shown the in above collection of Json data. What is the best way to accomplish this?
My current code:
@(Html.Kendo().Chart<
CBECloudBO2.ViewModels.ChartHourlySales
>()
.Name("chartHourlySales")
.Title("Hourly Sales")
.DataSource(datasource => datasource
.Read(read => read.Action("Chart_HourlySales", "Home")))
.Legend(legend => legend
.Visible(false))
.ChartArea(chartArea => chartArea
.Background("transparent"))
.Series(series =>
{
series.Column(p => p.Value).Name("Total Sales");
})
.CategoryAxis(axis => axis
.Name("series-axis")
.Line(line => line.Visible(false))
)
.CategoryAxis(axis => axis
.Name("label-axis")
.Categories(p => p.Hour)
)
.ValueAxis(axis => axis
.Numeric()
.AxisCrossingValue(0, int.MinValue)
)
.Tooltip(tooltip => tooltip
.Visible(true)
.Format("{0}%")
.Template("#= series.name #: #= value #")
)
)
Thanks,
Shawn
Apologies for what I hope is a stupid question, given I'm new to MVC & web development.
I have a TreeView with manually added child nodes off the root. I then want to add child nodes to each of those nodes via a foreach loop
The code (that is wrong) is
@(Html.Kendo().TreeView()
.Name("treeview")
.Items(treeview =>
{
treeview.Add().Text("Root")
.Expanded(true)
.Items(root =>
{
root.Add().Text("Child")
.Expanded(true);
foreach(var item in Model.Entity.GrandChildData)
{
{add to Child } item.data;
}
Thanks