Hello,
Could you please let me know how one can control the placement of the slider tooltip? By default it is to bottom and the ask is to have it placed above.
Thanks!
Hello, I'm currently evaluating the MVC controls. I've created a custom control panel where the user can filter or create new items on the table. Currently the filter is working perfectly using javascript. The create button is not. I added the class k-grid-add but no luck. I look at the link the grid creates when using the standard create button in the toolbar and it looks something like this: tblAgents_Read?grid-mode=insert . I've tried adding this link to my custom link but it will return all data in a json file. Any help?
Hi,
we need to bind datatables to a grid. For that we found the following example code:
http://www.telerik.com/support/code-library/binding-to-datatable-0191a594e359
This is working fine with the following exception:
We need a custom popup editor. But this requires a model we do not have because the grid is <dynamic>. What can we do?
Best regards,
Thomas
Hi,
I have a frustrating issue with fields in my model not being populated in the Update action callback in my controller. The model:
public class CountsPerMonthModel
{
[Editable(false)]
public int Id { get; set; }
public UserModel User { get; set; }
public int January { get; set; }
public int February { get; set; }
public int March { get; set; }
public int April { get; set; }
public int May { get; set; }
public int June { get; set; }
public int July { get; set; }
public int August { get; set; }
public int September { get; set; }
public int October { get; set; }
public int November { get; set; }
public int December { get; set; }
}
The User property is being correctly populated. Integer fields January through December are not.
The callback:
[HttpPost]
public ActionResult CountsPerMonthUpdate([DataSourceRequest] DataSourceRequest request, CountsPerMonthModel model)
{
// model has User set, but January through December are always 0
// digging into request, the values are set correctly
}
And finally, the code for the popup template:
@model App.Models.CountsPerMonthModel
<
ul
class
=
"errors"
></
ul
>
<
div
class
=
"editor-label"
>
@Html.LabelFor(m => m.User)
</
div
>
<
div
class
=
"editor-field"
>
@(Html.Kendo().DropDownListFor(m => m.User)
.Name("User")
.OptionLabel("Select user...")
.DataTextField("DisplayName")
.DataValueField("UserId")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetUsers", "Management", new { includeReadOnly = false });
});
})
)
</
div
>
<
div
>
<
p
>@Html.Label("Counts Per Month")</
p
>
</
div
>
<
div
class
=
"editor-label"
>
@Html.LabelFor(m => m.January)
</
div
>
<
div
class
=
"editor-field"
>
@Html.EditorFor(m => m.January)
@Html.ValidationMessageFor(m => m.January)
</
div
>
<
div
class
=
"editor-label"
>
@Html.LabelFor(m => m.February)
</
div
>
... snipped for brevity ...
<
div
class
=
"editor-field"
>
@Html.EditorFor(m => m.February)
@Html.ValidationMessageFor(m => m.February)
</
div
>
<
<
div
class
=
"editor-label"
>
@Html.LabelFor(m => m.December)
</
div
>
<
div
class
=
"editor-field"
>
@Html.EditorFor(m => m.December)
@Html.ValidationMessageFor(m => m.December)
</
div
>
@Html.HiddenFor(m => m.Id)
When given a populated model, the values are displayed correctly in each field, it is only when Update is clicked, any updated values in the fields are not populated into the model object in the callback.
Any thoughts on what the issue might be? I've used similar code in other places, this is the first time though that any fields have been an int type, so am wondering if I'm missing something somewhere...
Also, the editor template for Integer is as follows:
@model int?
@(Html.Kendo().IntegerTextBoxFor(m => m)
.HtmlAttributes(new { style = "width:100%" })
.Min(int.MinValue)
.Max(int.MaxValue)
)
Thanks,
Craig.
I have a DataSet that I'm generating on the fly.
I'm doing this by collecting all of my data and then building a DataTable and then using the DataTable as a DataSource for my Kendo Grid.
The Grid is set up to use AutoGenerated columns, like this ...
@(Html.Kendo().Grid(Model.Data)
.Name(
"grid"
)
.Columns(c =>
{
c.AutoGenerate(
true
);
}
.Scrollable()
.Resizable(a =>
{
a.Columns(
true
);
})
)
I want to freeze the first column in this Grid (I will always know what this column is).
I haven't found a way of manipulating the Columns at all when using AutoGenerated columns and have had to resort to a number of jQuery/CSS 'fudges' to get the Grid looking and behaving the way that I want it to.
However, I'm at a loss as to how I might be able to freeze a column when the Grid uses AutoGenerated columns.
Is is actually possible?
If it is, would you care to give me a hint as to how I might go about it?
Hello,
sometimes when I try to Upload files via the upload-control the upload ends up in 103% without the save and onsuccess-events firing. It doesn't seem to have anything to do with the file itself, as I'm always using the same. Sometimes it works, sometimes it doesn't.
function onSuccess(e) {
var gridNotification = $("#gridNotification").data("kendoNotification");
var crmType = $("#ddlCrmType").data("kendoDropDownList");
var csvHeadRow = e.response.csvHeadRow
var url = '@Url.Action(MVC.Mapping.ReturnMappingGrid())';
$.ajax({
type: "POST",
url: url,
data: JSON.stringify({ csvHead: csvHeadRow, crmType: crmType.text() }),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
$('#gridContainer').html(data);
gridNotification.show("Die Auswahl der jeweiligen Eigenschaft erfolgt durch Klicken des jeweiligen Eigenschaft-Felds!")
var container = $(gridNotification.options.appendTo);
},
error: function (xmlHttpRequest, textStatus, errorThrown) {
debugger;
console.log(xmlHttpRequest.responseText);
console.log(textStatus);
console.log(errorThrown);
},
async: false
});
}
@(Html.Kendo().Upload()
.Name("upMappingFile")
.Multiple(false)
.ShowFileList(true)
.TemplateId("fuCsvTemplate")
.Async(a => a
.AutoUpload(true)
.Save("SaveFile", "Mapping")
.Remove("RemoveFile", "Mapping")
)
.Enable(false)
.Events(e => e
.Success("onSuccess"))
.Messages(m => m
.Select("Durchsuchen...")
.HeaderStatusUploading("Uploading...")
.HeaderStatusUploaded("Fertig"))
)
I've following code in razor view. How do I use Kendo Radio button to render the same? I'm struggling to assign enum to radio button value.
@if (Model == declaredEnum.Val1) //declaredEnum is Enum
{
@Html.RadioButtonFor(l => l, (int)declaredEnum.Val1, new { @checked = "checked" });
}
else
{
@Html.RadioButtonFor(l => l, (int)declaredEnum.Val1);
}
@Html.LabelFor(l => l, "Label")
Hi,
I am facing problem while using kendo dropdownlist with kendo grid. I have a kendo grid with all the fields as dropdown (around 12 fields) except one column(employeename) as a simple display column. For dropdown fields, I have created partial views as EditorTemplates and attached them to the grid column. But when I run my application, initially it does not display the dropdowns. When click the cell turns into a dropdown field and when I select any value and change focus, the grid cell gets populated with dropdown value property and not the text property. For some of the columns, it even does not set the selected value in cell. No idea what is the issue. below is my code:
@(Html.Kendo().Grid(Model)
.Name("EmployeeHarborGrid")
.EnableCustomBinding(false)
.Columns(columns =>
{
columns.Bound(d => d.EmployeeName).Title("Employee");
columns.Bound(d => d.AcaJobClassification).Title("ACA Job Classification")
.EditorTemplateName("_AcaJobClassification").Width(120).ClientTemplate("#:AcaJobClassification#");
columns.Bound(d => d.TwelveMonthsOffer).Title("12 Months Offer")
}
my editor template code:
@using Kendo.Mvc.UI
@(Html.Kendo().DropDownListFor(m => m)
.Name("AcaJobClassification").HtmlAttributes(new { @style = "font-size:12px" })
.DataTextField("Text")
.DataValueField("Value")
.BindTo(new List<SelectListItem>()
{
new SelectListItem() {Text="--Please Select--", Value="0"},
new SelectListItem() {Text="Contract", Value="1"},
new SelectListItem() {Text="Educator", Value="2"},
new SelectListItem() {Text="Fulltime", Value="3"},
new SelectListItem() {Text="Parttime", Value="4"},
})
.SelectedIndex(3)
)
If employee record exists, then I want the dropdowns to pick the record value and set the dropdown index accordingly.
Can I achieve this with ClientTemplate attribute on the column. I would prefer using ClientTemplate instead of creating EditorTemplate. Please suggest. Also, I want to bind this dropdown with an Enum list but facing problem with that as well. Can you help me out with that as well?
Appreciate your quick reply.
Thanks.