Telerik Forums
Kendo UI for jQuery Forum
2 answers
5.5K+ views

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

Jacob
Top achievements
Rank 2
 answered on 23 Jul 2015
1 answer
800 views

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:

 http://dojo.telerik.com/oWalE

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!

Plamen Lazarov
Telerik team
 answered on 23 Jul 2015
5 answers
313 views
Hi,

Using asp.net mvc4 razor with latest kendoUI scripts.

Kendo CDN scripts are all referenced in master layout

On a View I have a link to another view. I have wired up this link to open a jquery dialog instead. The $.get method runs the controller ActionResult which, for ajax, returns a partialview(model). This works fine. Dialog is rendered, view content shown ok. 

Issue: When the dialog is opened, the Upload widget is not rendered. Only basic html file input is rendered.

In the source, there is no kendoUI markup (I saw a previous issue surrounding z-index) only the html file input tag.

Controller/Action:

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);
        }
View
01.@model MvcWebRole1.Models.Question
02.@{
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 => a
27.                .Save("EditGameUploadMedia", "Engage")
28.                .Remove("EditGameRemoveMedia", "Engage")
29.                .AutoUpload(true)
30.            )
31.            .Events(events => events
32.                .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 on
75.                return false;
76.            });
77.        });
78.    });
79.</script>

screenshot:
http://prntscr.com/1007bl

If I skip the jQuery dialog and open the view completely, the Upload renders as normal. 

Thinking along the lines of the kendo scripts are not referenced in the dialog as the html input is not being kendo'd or jQueryUI is stopping it.

Any help appreciated.

Thanks.
Vladimir Iliev
Telerik team
 answered on 23 Jul 2015
1 answer
605 views

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>​ 

 

Iliana Dyankova
Telerik team
 answered on 23 Jul 2015
1 answer
87 views

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

Kiril Nikolov
Telerik team
 answered on 23 Jul 2015
3 answers
147 views

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  

Dimo
Telerik team
 answered on 23 Jul 2015
7 answers
193 views
Hello,

I am attempting to change the position of the auto connector. I would prefer the connector to not show up at all, but the functionality to be present. To work around this issue I am attempting to override the position function of the connector so that it sits underneath the left connector as shown in this example: http://dojo.telerik.com/iREkA/11
However, when I hover over the shape the auto connector is still shown in the middle of the shape. If I override it outside of the shape defaults this seems to work so why would it not work in the shape defaults?

Thanks
Manoj
Top achievements
Rank 1
 answered on 23 Jul 2015
1 answer
180 views
I was wondering if there is a way to display some text on a task bar in the timeline view other than the "title" field.  The name of a project is the value for the "title" field in my Gantt chart, but since that information is already displayed on the left side on the Gantt chart in the tree view I want to display a different field value on the bar. 
Bozhidar
Telerik team
 answered on 23 Jul 2015
6 answers
475 views
Dear Community,

Below are the details of items I have on my page:

I have a DIV on my page:
<div id="grid" />

My code
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
                                    }
                                ]
            });
             
        });

The Problem

The challenge we are facing is in IsActive column. As you can see that I'm using a template for this column to show check-box in UI instead of regular column. Whenever, I change the selection of my check-box, it just gets reflected on UI but doesn't update the viewmodel (it should have as it is an observable data source).

If I remove the template from this column then change in checkbox changes the viewmodel. I want my viewmodel to update as per changes made in UI in my scenario.

Please share your comments.

Best Regards,
Shiva




Alexander Valchev
Telerik team
 answered on 23 Jul 2015
3 answers
505 views
I have a tab strip where two of the tab urls differ only by the url parameters.  For example:
<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>

The tab strip works as expected when clicking/tapping to navigate but when navigating using kendo.navigate(), the correct tab button is not visually selected.

Can you confirm that this is a bug that will be fixed.  Also, is there any quick workaround for this?  Thanks.
Petyo
Telerik team
 answered on 23 Jul 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?