Hi,
I’m working on a product that utilizes Kendo Grids where the text displayed in the column headers are often too wide to be displayed without ellipses.
There are too many columns to use the 'auto-width' functionality (we must have a horizontal scroll bar), and we cannot rely on fixed widths to be sufficiently wide enough when the text is translated into different languages.
In some cases, as when the titles consist of several words, a simple CSS fix like this would suffice (although it yields unevenly aligned filter icons):
.k-grid .k-header{
overflow: visible;
white-space: normal;
}
However, given that the text in these headers is internationalized (and runs the risk of being translated into long German nouns), there should be a more robust solution for viewing these column names. Do you know of any thing we can do to alleviate this problem?
Proposed solutions include:
- automatically line-breaking words with hyphens, instead of truncating with ellipses
- adding tooltips that display the full name of the column on hover
We are trying to call .blur() on an auto complete after the user has selected an item. The main reason for this is that when the textbox has focus, the keyboard on the iPad remains up. We were given a requirement that we hide the keyboard after the user selects an item, something we figured we could accomplish by simply invoking .blur() on the input field. What we are finding though is that something in the framework immediately re-calls focus() on the input right after we call blur(). I've tried many different little hacks to override, cancel, or prevent the various events but I've had no luck. I've created a Dojo that demonstrates this behavior:
If you look at the console, you can see the order in which events are firing:
focus
open
change
close
blur <-- I called this one programatically
focus <-- I did not call this one!
Any ideas as to how we can get the iOS keyboard to go away after an item has been selected?
Thanks!
public ActionResult EditQuestion(int id = 0) { Question question = db.Questions.Find(id); if (question == null) { return HttpNotFound(); } if (Request.IsAjaxRequest()) { return PartialView(question); } return View(question); }01.@model MvcWebRole1.Models.Question02.@{03. ViewBag.Title = "EditQuestion";04.}05.@using (Html.BeginForm())06.{07. @Html.AntiForgeryToken()08. @Html.ValidationSummary(true)09. @Html.HiddenFor(model => model.QuestionID)10. @Html.HiddenFor(model => model.ID)11. 12. <div class="editor-label">13. @Html.LabelFor(model => model.QuestionText, "Enter the question text")14. </div>15. <div class="editor-field">16. @Html.EditorFor(model => model.QuestionText)17. @Html.ValidationMessageFor(model => model.QuestionText)18. </div>19. 20. <div class="editor-label">21. @Html.LabelFor(model => model.QuestionMediaUrl, "Upload Media")22. </div>23. <div class="editor-field">24. @(Html.Kendo().Upload()25. .Name("files")26. .Async(a => a27. .Save("EditGameUploadMedia", "Engage")28. .Remove("EditGameRemoveMedia", "Engage")29. .AutoUpload(true)30. )31. .Events(events => events32. .Success("onSuccess")33. )34. )35. <br />36. @Html.EditorFor(model => model.QuestionMediaUrl)37. </div>38. 39. <script>40. function onSuccess(e) {41. var Response = e.response;42. $("#QuestionMediaUrl").val(Response.st);43. }44. </script>45. <p>46. <hr />47. <input type="submit" value="Save & Return" />48. </p>49.}50. 51.@section Scripts {52. @Scripts.Render("~/bundles/jqueryval")53.}54. 55.<div id="dialog" title="Title"></div>56.<script>57. $(document).ready(function () {58. $(function () {59. $('.modallink').click(function (e) {60. console.log("in");61. $.get($(this).prop('href'), function (response) {62. $("#dialog").html(response);63. $("#dialog").dialog({64. height: 400,65. width: 650,66. modal: true,67. buttons: {68. Cancel: function () {69. $(this).dialog("close");70. }71. }72. });73. });74. e.preventDefault(); // don't let it continue on75. return false;76. });77. });78. });79.</script>I want to add an img to the series label and put the same image into the series drawing area if possible, i did the following:
<script>
function createChart() {
$("#chart").kendoChart({
title: {
position: "bottom",
text: "Shareholders Share Percentage"
},
legend: {
visible: false
},
chartArea: {
background: "#f4f4f4"
},
seriesDefaults: {
labels: {
visible: true,
background: "transparent",
template: function(e) {
return ' A ';
}, //" #= category # \n #=value#% ",
font: "18px 'ralewayregular'"
}
},
series: [{
type: "pie",
startAngle: 150,
data: [{
category: "ADNOC",
value: 60.0,
color: "#3b6492"
//explode: "explode"
}, {
category: "JODCO",
value: 12.0,
color: "#b3c1db",
}, {
category: "BP",
value: 14.64,
color: "#7d9ac6",
}, {
category: "Total",
value: 13.32,
color: "#4877af",
}]
}],
tooltip: {
visible: true,
format: " <b style='font-size:16px'>{0}%</b> "
}
});
}
$(document).ready(createChart);
$(document).bind("kendo:skinChange", createChart);
</script>
In my grid, one of the filterable columns (using the mult-checkbox filterable) has data that is quite long. Is there an option to tell kendo to allow wrapping of this data in the dropdown filterable mult-checkbox popup?
Thanks,
--Ed
Hi
I'm usig with kendo ui grid with virtual scroll and sever paging configuration, in my solution there are a lot of grids that i create from one query,Each grid had been created from a defined directive, these grids holds by vertical main scroll container.
<-HERE IS THE SCROLL PROBLEM->
Grids that created with vertical scroll keep the event scroll to be manage over page while grid without vertical scroll preventing
the main scrolling event.to work while the focus still in the grid.(see the attacment image).
Is it common problem or a bug ?
please advise
thanks

<div id="grid" />var viewModel = kendo.observable({ gridSource: [ { FirstName: "Shiva", LastName: "Wahi", City: "Delhi", Title: "Module Lead", BirthDate: "10/29/1984", Age: 27, IsMarried: "N", IsActive: true }, { FirstName: "Priya", LastName: "Srivastava", City: "Noida", Title: "Tech Lead", BirthDate: "08/19/1982", Age: 30, IsMarried: "Y", IsActive: false } ] }); function IsMarriedConverter(status) { if (status == "Y") return "Married"; else return "Un-Married"; } $(document).ready(function () { $("#grid").kendoGrid({ dataSource: { data: viewModel.gridSource, schema: { model: { fields: { FirstName: { type: "string" }, LastName: { type: "string" }, City: { type: "string" }, Title: { type: "string" }, BirthDate: { type: "date" }, Age: { type: "number" }, IsMarried: { type: "string", editable: false }, IsActive: { type: "boolean" } } } }, pageSize: 10 }, width: 500, height: 250, editable: true, groupable: true, scrollable: true, sortable: true, filterable: true, pageable: true, toolbar: ["create", "save", "cancel"], columns: [ { field: "FirstName", title: "First Name", width: 75 }, { field: "LastName", title: "Last Name", width: 75 }, { field: "City", width: 75 }, { field: "Title", width: 75 }, { field: "BirthDate", title: "Birth Date", width: 75, template: '#= kendo.toString(BirthDate,"MM/dd/yyyy") #' }, { field: "Age", width: 50 }, { field: "IsMarried", width: 50, template: '#= IsMarriedConverter(IsMarried) #' // Value converter }, { field: "IsActive", width: 50, template: '<input type="checkbox" #= IsActive ? checked="checked" : "" # />' // Creating checkbox column } ] }); });<div data-role="tabstrip"> <a href="#itemsView?favorites=1" data-icon="icon-star">Favorites</a> <a href="#itemsView" data-icon="icon-all">Items</a></div>