In the demo here : http://demos.telerik.com/kendo-ui/grid/virtualization-remote-data and in other tests I have done in my app, it seems that the request to load data from the remote datasource is done two times (or sometimes just one time as expected).
The problem with this behavior is that my app has to perform a big query in the database two times instead of one, which is bad for performance.
Is there any reason why this is done this way or is this a bug ?
I have tested on OSX with Safari, Firefox Dev and Opera Dev.
Thanks for your help.

Hi,
One of the columns is an ID of a record. Id has a certain format something like: XXXX-XXX-1 etc.
When sorting on this column values show as:
XXXX-XXX-1
XXXX-XXX-10
XXXX-XXX-2
XXXX-XXX-3
...
Is there a way to properly sort such that -10 appears after?
Thanks
var release_grid = $("#release_grid").kendoGrid({ dataSource: dataSource, pageable: false, sortable: true, columns: [ { field: 'primary', title: 'Primary?', width: '78px' }, { field: 'iso_3166_1', title: "Country", width: '320px', editor: countryDropDownEditor, template: kendo.template($("#country_template").html()) }, { field: 'release', title: "Release Date", format: '{0:yyyy-MM-dd}', width: '105px' }, { field: 'certification', title: 'Certification', width: '105px', editor: certificationDropDownEditor, template: '#=certification#' }, { command: [ { name: "edit", text: { edit: "Save", update: "Save", cancel: "Cancel" }, template: kendo.template($("#edit_template").html()) }, { name: "destroy", template: kendo.template($("#delete_template").html()) } ], title: 'Edit' }], editable: { mode: 'popup', confirmation: 'Are you sure you want to delete this record?' }});function certificationDropDownEditor(container, options) { $('<input data-text-field="certification" data-value-field="certification" data-bind="value:' + options.field + '"/>').appendTo(container).kendoDropDownList({ autoBind: false, dataSource: { type: "json", transport: { read: '/country/certifications' } } });}Hi all , I need some help with some issues in a custom editor I add to a kendo grid . I'm using MCV and the code is the following :
@(Html.Kendo().Grid<GridProspectObject>()
.Name("GridAllProspects")
.AutoBind(false)
Events(events =>
{
events.DataBound("loadtooltipsAllProspectsGrid");
events.Edit("onEditAssignment");
})
.Columns(columns =>
{
columns.Bound(p => p.ProspectName).Title("name");
columns.Bound(p => p.Class).Title("class");
columns.Bound(p => p.DisplayStatus).Title("assignment status (click to change)").ClientTemplate("#=AssignedTo#").EditorTemplateName("EditorVolunteer").HtmlAttributes(new { @style = "text-align:left" });
})
.ToolBar(toolbar =>
{
toolbar.Save();
})
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Pageable()
.Sortable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.Batch(true)
. PageSize(50)
.Model(model =>
{
model.Id(p => p.ProspectId);
model.Field(p => p.ProspectName).Editable(false);
model.Field(p => p.Class).Editable(false);
})
.Read(read => read.Action("Read_AllProspects", "Projects", new { listId = prospectList.PROSPECT_LIST_ID, pid = Model.PROJECTS_ID }).Type(HttpVerbs.Get))
. Update(update => update.Action("ChangeAssignment", "Projects"))
)
.HtmlAttributes(new { @style = "margin-top:10px" })
)
The editor template is a kendo comboBox :
@(Html.Kendo().ComboBox()
.Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
.Filter("contains")
.Placeholder("--select--")
.DataValueField("Value")
.DataTextField("Name")
.Events( events =>
{
events.DataBound("dataBound");
events.Open("openDropDown");
})
.DataSource(dataSource => dataSource
.Read(read => read.Action("ReadAsignmentOptions", "Projects").Data("getParentId") )
)
.Template("#if( data.Value == '" + Guid.Empty + "' || data.Value == '-1' ) {# " +
"<span class='specialOption'>#:data.Name #</span>" +
" #} else {# " +
"<span>#:data.Name#</span>" +
" #}#")
)
Finally the "getParentId()" function is :
function getParentId() {
var row = $(event.srcElement).closest("tr");
var grid = $(event.srcElement).closest("[data-role=grid]").data("kendoGrid");
var dataItem = grid.dataItem(row);
return { prospectId: dataItem.ProspectId, currentAssigned: dataItem.AssignedToId };
}
The issues I need help with are :
1) I want to add server filtering to the combobox so I can display a custom message "no results to display" when the text entered in the comboxbox returns no results but when I add the options "ServerFilter(true)" to the comboxbox the function getParentId() throws an error saying "cannot ready property dataItem of null".
2) When a selection is made from the combobox (the same custom editor) , I want to display that selection with the red corner in the cell visible, so the user can see the change before saving . Right now when I select an option the old value keeps showing in the grid cell and only red icon appears.
3) This code works fine in IE and Google Chrome , but for some reason it does not work in Firefox. When I click on the grid cell to edit it the combobox just spins forever because the request never gets to the controller. Is this a known bug ?
Thanks !
When a row on a grid is clicked a popup form is opened. Inside the form I setup a Razor Kendo DropDownList from a database. I was able to mange the DropDownList to change HTML tables based on the drop down value. However, when the form is initially loaded I am not able to show the correct table in other words i am not able to get the value of the current displayed item.
This is how I change tables when the user select different item in the menu:
$(function () {
$('#PaymentType_ID').change(function () {
$('.payment').hide();
if ($(this).val() == "5") {
$('.payment').hide();
}
if ($(this).val() == "2") {
$('#creditCardPayment').show();
$('#generalPayment').show();
}
if ($(this).val() == "1" || $(this).val() == "3" || $(this).val() == "4") {
$('#otherPayment').show();
$('#generalPayment').show();
}
});
});
I want to reuse most of the code but instead of using on .change I want to use something like .ready but it does not work.
Anyone has any idea how should I try?
I am not sure if this has been asked already. If yes, please point me to that thread.
Use case: This happens when a row template is implemented in Grid. If the content of cell is edited and tab key is pressed, the focus jumps to next item. But the edited cell still maintains the editor.
Expected Behavior : As soon as tab is pressed and focus get shifted out of the edited cell, the cell should display in "normal" mode rather than edit mode.
Refer to this link for my implementation
http://dojo.telerik.com/@kamit1983/IREku/11
Thanks
Hi,
I have a form with validations setup and everything works fine if user tries to enter something. If user directly clicks on the submit button after page load with out touching any field then validations wont fire.
Take a look at the example here http://dojo.telerik.com/AXIsI/2
if you just go into the text box and tab out, then error message is displayed. if you directly click on the button with out touching then validation message is not displayed as the rules is skipped based on input name checking. How can make this work?
I made the example to be simple, in real scenario there is so much complex logic involved. So I cannot avoid using check on name and also I cannot use just the html5 "required" attribute

Hi,
Does the Upload control allow setting a minimum file size so that files below this limit won't be uploaded?
Thanks