Hi Guys,
In my application I have a grid within a grid using ClientDetailTemplateId
in my subgrid I want to have 5 tabs, but in one specific instance I would like to have 6.
I created a script to remove the 6th tab with JavaScript, but this doesn't work in IE. and also it's not nice.
What I actually want is something like this.
if (#=MyId# == "9212")
{
items.Add().Text("Title").Content(
where only if MyId = 9212 the item should be added,
but whatever I try I can't get it to work.
is there someone who can help me?
Thank you in advance.
I am really fresh to kendo and MVC.
This is my Index.cshtml file. I am trying to send new startDate and endDate to my controller . but looks like I am doing something wrong.
I am trying to figure out how to post the change from datetimepicker towards my controller.
@using Kendo.Mvc.UI
@{
ViewBag.Title = "New Measurement Period";
}
<h1> New Measurement Period</h1>
<div>
<label for="start">Start Date:</label>
@(Html.Kendo().DateTimePicker()
.Name("startDate")
.Value(DateTime.Now)
.HtmlAttributes(new { style = "width: 100%", title = "datetimepicker" })
.DateInput()
)
<label for="end">End Date:</label>
@(Html.Kendo().DateTimePicker()
.Name("endDate")
.Value(DateTime.Now)
.HtmlAttributes(new { style = "width: 100%", title = "datetimepicker" })
.DateInput()
)
@(Html.Kendo().Button()
.Name("primaryTextButton")
.HtmlAttributes(new { type = "button"})
.Content("Submit"))
<script>
$(document).ready(function () {
// create DateTimePicker from input HTML element
$("#datetimepicker").kendoDateTimePicker({
value: new Date(),
dateInput: true
});
});
</script>
</div>
Hi,
I have 8 (bootstrap) Tabs along with 8 PivotGrids (all with different names/ids, endpoints).
While some of them load correctly some, load the data, but then apply "display:none;" to the columns and rows (see attached).
I don't get any console errors, so not sure why this is happening, other than it doesn't like have 8 on one page?
I tried looking at the RequestEnd callback to maybe remove the "display:none;:" from the tables, but the data that's passed doesn't contain which PivotGrid it's for.
So i'm stuck any recommendations apart form "don't have 8 on one page :P"
When I put a Combobox inside my upload template, it puts a script(Combobox script) within a script (template script). The browser does not like this and stops rendering correctly. How do I make this happen?
Thanks
I'm attempting to set the filter on some of my columns to Multi, just like the demo at https://demos.telerik.com/aspnet-mvc/grid/filter-multi-checkboxes shows.
I have tried it with and without an ItemTemplate, with and without Search, with and without a BindTo, and just about anything else I can think of. The filter only ever shows a text box with the button opening a dropdown for equals/contains/starts with/etc, never the checkboxes expected.
I'm using version 2017.3.1026.
Why does this not work like the demo?
@{Html.Kendo().Grid<PersonGridViewModel>()
.Name(
"Grid2"
)
.Columns(c =>
{
c.Bound(e => e.Race) .Width(275).Filterable(f => f.Multi(
true
).Search(
true
));
c.Bound(e => e.Ethnicity).Width(225).Filterable(f => f.Multi(
true
));
// other columns
}
.Filterable(f => f.Mode(GridFilterMode.Row))
.DataSource(d => d
.Ajax()
.ServerOperation(
false
)
.Model(m => m.Id(r => r.ID))
.Read(r => r.Action(
"action"
,
"controller"
))
// Actual names replaced with placeholder
)
.Render();
}
Hi
I see this code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Kendo UI Snippet</title>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2017.1.223/styles/kendo.common.min.css"/>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2017.1.223/styles/kendo.rtl.min.css"/>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2017.1.223/styles/kendo.silver.min.css"/>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2017.1.223/styles/kendo.mobile.all.min.css"/>
<script src="http://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2017.1.223/js/kendo.all.min.js"></script>
<style>
.mySearchIconx {
background-image: url("http://kendo.cdn.telerik.com/2017.1.223/styles/Bootstrap/sprite.png");
background-position: -32px -240px;
}
</style>
</head>
<body>
<button id="button" type="button">Search</button>
<script>
$("#button").kendoButton({
spriteCssClass: "mySearchIconx"
});
</script>
</body>
</html>
2 Questions
1) How does it know why to show the Search icon? Sprite.png contains a lot of icons? What to change if i want anither icon?
2) My project has a folder structure with "Content\Bootstrap\ in which folder the sprite.png is, i don't want to use
background-image: url("http://kendo.cdn.telerik.com/2017.1.223/styles/Bootstrap/sprite.png");
but use my own file on disk. I tried a lot of combinations like:
background-image: url("~\Content\Kendo\Bootstrap\sprite.png");
But i don't get it working
Any help is appreciated
Eric
Hi,
I am having an issue trying to update the parent in a hierarchical grid after making changes in the child.
I am remembering which detail rows have been opened at the time they are opened using the DetailExpand event
I can get the data-uid's of all parent rows without issue.
So then when I update a child I need to refresh the child and also refresh the parent so that some counts are updated.
After the child is updated I call Read on the parent
$('#grid').data().kendoGrid.dataSource.read()
This also works as expected and the parent grid reloads its data with the new counts.
However I then want to re-open detail grids that were open before read was called so the user is back where they were, not be in the default situation that all rows are collapsed again.
I thought I could just call expandRow on the grid for the id(s) that I collected earlier
dataGrid.expandRow(dataGrid.tbody.find("tr[data-uid='" + id + "']"))
However the data-uid's for all of the parent rows have now changed making my collection useless.
I thought a slightly more noddy way to do it would be to remember the indexes of the rows that were open but this is no good as the rows can change order upon the data re-loading, those counts that are being updated are used in sorting, so that is no good.
Is there something I can do to keep the data-uid's consistent across calls or some other way of remembering which ones are expanded?
By the way I also tried:
$('#grid').data().kendoGrid.refresh()
This allows me to open up the rows that were expanded but it doesn't actually reload the data so the parent counts are not updated...
Is there a way to make the value from an autocomplete column not go blank by default when you click the "Edit Button"?
The grid is correctly loading, but when I hit "Edit" instead of defaulting to the value that is loaded for my autocomplete column in "View" mode I get a blank value.
@(Html.Kendo().Grid<CostCenterModel>()
.Name("settinggrid")
.AutoBind(true)
.Editable(editable => editable.Mode(GridEditMode.InLine).DisplayDeleteConfirmation(false))
.Columns(columns =>
{
columns.Bound(c => c.CompositeId).Hidden();
columns.Bound(c => c.CostCenterOwner.NameAndId).EditorTemplateName("_ucUsersAutocomplete");
columns.Bound(c => c.CostCenter);
columns.Bound(c => c.Setting);
columns.Bound(c => c.SendEmailsFlag).ClientTemplate("<input type='checkbox' # if (SendEmailsFlag) { #" +
" checked='checked' " + "# } # onclick='return false' /> ").Title("Send Emails");
columns.Command(commands =>
{ commands.Edit(); commands.Custom("Delete").HtmlAttributes(new { @class = "k-delete" }).Click("deleteRow"); }
).Title("Action").Width("100");
})
.ToolBar(toolbar => toolbar.Create().Text("Add New Cost Center Owner"))
.Scrollable()
.Sortable()
.Filterable()
.ColumnMenu()
.Resizable(rsb => rsb.Columns(true))
.Reorderable(r => r.Columns(true))
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Id(c => c.CompositeId); // Specify the property which is the unique identifier of the model.
model.Field(c => c.CostCenterOwner).DefaultValue(new UserModel());
})
.Read(read => read.Action("Settings_ReadCostCenter", "Admin"))
.Update(update => update.Action("Settings_UpdateCostCenter", "Admin"))
.Create(create => create.Action("Settings_CreateCostCenter", "Admin"))
)
)
Hello,
We wish to be able to select/deselect the checkbox in the Checkbox selection column on click of the row as well as clicking the checkbox directly.
I can't seem to see any examples of this in your demos.
Thank you
Lucy