Telerik Forums
Kendo UI for jQuery Forum
1 answer
838 views

In multiselect control, when user click delete icons of a selected value , it should alert confirmation message and based on user  input "Yes" , "No" it should delete the selection or cancel it.

I tried as below, it shows confirmation popup but is not waiting for user confirmation

$(".k-delete").click(function (e) {
            //window.event.cancelBubble = true;
            //e.stopPropagation();
            currentSelection = s.value()
            $("#dlgDeleteSecFromAnalyst").html("Are you sure you want to remove.. clicked.");
            $("#dlgDeleteSecFromAnalyst").dialog("open"); 

        })

Dimiter Topalov
Telerik team
 answered on 25 Mar 2016
3 answers
198 views
Can you please share example for "selectable: 'multiselect'" with virtualization enabled for grid. The page size is 50. if data is more than 1000 rows, if user selects all the 1000 rows then select() method always returns 10-55 rows randomly. Also how to maintain the selection with scroll. since grid renders only current page.
Alexander Valchev
Telerik team
 answered on 25 Mar 2016
1 answer
118 views
Help me please
How to  select (<strong> or <b> or ...) the current date, which is at the bottom?
Based on the selected item (::hover ...)
Screenshot:
EZ
Top achievements
Rank 2
 answered on 25 Mar 2016
2 answers
220 views

I have a grid which i want to hide the columns when they are grouped and show them when are removed from our group panel. is there any other way than looping through all columns to show(commented code). 

                dataBound: function (e) {
                    // this function (event) runs when kendo grid gets new data that get bound
                    var gridDataSource = e.sender.dataSource;
                    if (gridDataSource.group().length > 0) {

                        // for (var i = 0; i < this.columns.length; i++) {
                        //     grid.showColumn(i);
                        // }

                        Ember.$("div.k-group-indicator").each(function (i, v) {
                            e.sender.hideColumn($(v).data("field"));
                        });
                        //the grid is grouped
                        Ember.$(".grouping-collapser").css('display', 'block');
                        e.sender.element.find(".k-icon.k-i-collapse").trigger("click");
                    } else {
                        Ember.$(".grouping-collapser").css('display', 'none');
                    }
                }

Niloofar
Top achievements
Rank 1
 answered on 24 Mar 2016
5 answers
652 views
Has anyone noticed an odd styling issue with this control where the white background from the input area stretches out right past where it should so that it not only envelopes the up/down arrows, but also the right border of the input box? I turned off my entire style sheet so that I had no styles being rendered on the site except those from including the Kendo UI css files, and nothing changed. All the other Kendo UI controls are rendering fine on this page.

UPDATE:  It was actually a width setting in a style tag on the <input> container that I had set. If I remove it, it renders normally. Is there anyway to specify the width of this control?
Kevin
Top achievements
Rank 1
 answered on 24 Mar 2016
1 answer
218 views

Hello all,

 

I am using the Kendo validator to validate a form using the required HTML 5 attribute. However there is a browser based "please fill out this field" message that is showing IN ADDITION to the kendo tooltip for validation. Is there a way to prevent the default browser one so the Kendo error is the only one shown?

 

Thanks.

Dimiter Topalov
Telerik team
 answered on 24 Mar 2016
2 answers
405 views

I am using kendo diagram with visualTemplate 
http://demos.telerik.com/kendo-ui/diagram/index

I need to write name with bold font 

g.append(new dataviz.diagram.TextBlock({
    text: textBlock.label,
    x: textBlock.x,
    y: textBlock.y,
    bold: true // <--- ???
}));

and job title using normal font
What are workarounds?

Vessy
Telerik team
 answered on 24 Mar 2016
1 answer
488 views

I'm reading a sample JS object array and binding the information to the Kendo UI Grid as shown below

var sites = [{

            sitename: "HTS_SITE_001",
                address: "HTS Orion",
                contact: "john.smith@telerik.com",
                status: "70",
                persons: "5"
            },
               {

                   sitename: "HTS_SITE_002",
                   address: "Smith",
                   contact: "john.smith@telerik.com",
                   status: "70"
               },
              {

                  sitename: "HTS_SITE_003",
                  address: "Smith",
                  contact: "john.smith@telerik.com",
                  status: "70"
              },
               {

                   sitename: "HTS_SITE_004",
                   address: "Smith",
                   contact: "john.smith@telerik.com",
                   status: "70"
               }];

        $("#grid").kendoGrid({
            columns: [{ title: "Site Name", field: "sitename" },
               { title: "Site Address", field: "address"},
               { title: "Contact", field: "contact" },
                { title: "Status", field: "status" }],
            pageable: true,
            sortable: true,
            navigatable: true,
            dataSource: sites
        });
However, the styling of the grid is not what I expect. I want to populate the data in the HTML table which has the pre-defined styling as shown below.  How do I achieve this using Kendo Grid,

<div class="box-body">
            <div class="table-responsive">
                <table class="table no-margin">
                    <thead>
                        <tr>
                            <th data-field="sitename">Sites</th>
                            <th data-field="address">Address</th>
                            <th data-field="status">Status</th>
                            <th data-field="contact">Contact</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td><a href="pages/examples/invoice.html">HTS_SITE_001</a></td>
                            <td>#24, Pirmasenserstrasse</td>
                            <td>In progress</td>
                            <td>joe.simon@google.de</td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <!-- /.table-responsive -->
        </div>

Kiril Nikolov
Telerik team
 answered on 24 Mar 2016
1 answer
1.1K+ views

Hi,

I have created a custom template for adding events to the scheduler, and within this I have added 3 new fields, 2 drop downs and a text box. All 3 of the new fields are set as required. If I leave them blank and click save, the required validation message is shown for the new text field but not shown for the two drop down fields (see attached screen shot). How can I get the message to show for the drop downs (personnel & encounter)?

The html for my custom template is:

<div class="k-edit-label"><label for="personnel">Personnel Details</label></div>
<div data-container-for="personnel" class="k-edit-field">
    <select class="diaryDropDown" id="personnel" data-bind="value:personnel" data-role="dropdownlist" required="required"
            data-value-field="value" data-text-field="text">
        <option value="001">001: Bob Smith</option>
        <option value="002">002: John Smith</option>
        <option value="003">003: Mark Jones</option>
        <option value="004">004: Alan Evans</option>
    </select>
</div>         
<div class="k-edit-label"><label for="encounter">Encounter Type</label></div>
<div data-container-for="encounter" class="k-edit-field">
    <select class="diaryDropDown" id="encounter" data-bind="value:encounter" data-role="dropdownlist" required="required"
            data-value-field="value" data-text-field="text">
        <option value="1">Encounter A</option>
        <option value="2">Encounter B</option>
        <option value="3">Encounter C</option>
        <option value="4">Encounter D</option>
    </select>
</div>
<div class="k-edit-label"><label for="reason">Reason</label></div>
<div data-container-for="reason" class="k-edit-field">
    <input type="text" class="k-input k-textbox" name="reason" required="required" data-bind="value:reason">
</div>
<div class="k-edit-label"><label for="title">Title</label></div>
<div data-container-for="title" class="k-edit-field">
    <input type="text" class="k-input k-textbox" name="title" required="required" data-bind="value:title">
</div>
<div class="k-edit-label">
    <label for="start">Start</label>
</div>
<div data-container-for="start" class="k-edit-field">
    <input type="text"
            data-role="datetimepicker"
            data-interval="15"
            data-type="date"
            data-bind="value:start,invisible:IsAllDay"
            name="start" />
    <input type="text" data-type="date" data-role="datepicker" data-bind="value:start,visible:isAllDay" name="Start" />
    <span data-bind="text: startTimezone"></span>
    <span data-for="start" class="k-invalid-msg" style="display: none;"></span>
</div>
<div class="k-edit-label"><label for="end">End</label></div>
<div data-container-for="end" class="k-edit-field">
    <input type="text" data-type="date" data-role="datetimepicker" data-interval="15"data-bind="value:end,invisible:isAllDay" name="end" data-datecompare-msg="End date should be greater than or equal to the start date" />
    <input type="text" data-type="date" data-role="datepicker" data-bind="value:end,visible:isAllDay" name="end" data-datecompare-msg="End date should be greater than or equal to the start date" />
    <span data-bind="text: endTimezone"></span>
    <span data-bind="text: startTimezone, invisible: endTimezone"></span>
    <span data-for="end" class="k-invalid-msg" style="display: none;"></span>
</div>
<div class="k-edit-label"><label for="isAllDay">All day event</label></div>
<div data-container-for="isAllDay" class="k-edit-field">
    <input type="checkbox" name="isAllDay" data-type="boolean" data-bind="checked:isAllDay">
</div>
<div class="k-edit-label"><label for="recurrenceRule">Repeat</label></div>
<div data-container-for="recurrenceRule" class="k-edit-field">
    <div data-bind="value:recurrenceRule" name="recurrenceRule" data-role="recurrenceeditor"></div>
</div>
<div class="k-edit-label"><label for="description">Description</label></div>
<div data-container-for="description" class="k-edit-field">
    <textarea name="description" class="k-textbox" data-bind="value:description"></textarea>
</div>
<div class="k-edit-label"><label for="clinicID">Clinic</label></div>
<div data-container-for="clinicID" class="k-edit-field">
    <select id="clinicID" data-bind="value:clinicID" data-role="dropdownlist" required="required"
        data-value-field="value" data-text-field="text">
        <option value="1">Clinic A</option>
        <option value="2">Clinic B</option>
        <option value="3">Clinic C</option>
        <option value="4">Clinic D</option>
    </select>
</div>

 

My scheduler is defined as:

$('#divDiaryCalendar').kendoScheduler({
    date: new Date(commonFunctions.getSchedulerCurrentDate()),
    startTime: new Date(commonFunctions.getSchedulerCurrentDate() + " 08:00 AM"),
    endTime: new Date(commonFunctions.getSchedulerCurrentDate() + " 08:00 PM"),
    editable: {
        template: self.customTemplate(),
    },
    dataSource: {
        batch: true,
        transport: {
            read: {
                url: commonFunctions.getAjaxBaseUrl() + '/Api/V1/diary/read',
                dataType: "json"
            }, 
            create: {
                url: commonFunctions.getAjaxBaseUrl() + '/Api/V1/diary/create',
                dataType: "json"
            },
            update: {
                url: commonFunctions.getAjaxBaseUrl() + '/Api/V1/diary/update',
                dataType: "json"
            },
            destroy: {
                url: commonFunctions.getAjaxBaseUrl() + '/Api/V1/diary/destroy',
                dataType: "json"
            },
            parameterMap: function(options, operation) {
                if (operation !== "read" && options.models) {
                    return {models: kendo.stringify(options.models)};
                }
            }
        },
        schema: {
            model: {
                id: "AppointmentID",
                fields: {
                    AppointmentID: { from: "_id", type: "string" },
                    personnel: { from: "personnel", validation: { required: true } },
                    encounter: { from: "encounter", validation: { required: true } },
                    reason: { from: "reason", validation: { required: true } },
                    title: { from: "title", validation: { required: true } },
                    start: { type: "date", from: "start" },
                    end: { type: "date", from: "end" },
                    clinicID: { from: "clinicID" },
                    isAllDay: { type: "boolean", from: "isAllDay" },
                    startTimezone: { from: "startTimezone" },
                    endTimezone: { from: "endTimezone" },
                    description: { from: "description" },
                    recurrenceId: { from: "recurrenceID" },
                    recurrenceRule: { from: "recurrenceRule" },
                    recurrenceException: { from: "recurrenceException" }
                }
            }
        }
    },
    group: {
        resources: ["Clinics"],
        orientation: "horizontal"
    },
    resources: [
        {
            name: "Clinics",
            field: "clinicID",
            title: "Clinic",
            dataSource: [
                { text: "Clinic A", value: 1, color: "#f8a398" },
                { text: "Clinic B", value: 2, color: "#51a0ed" },
                { text: "Clinic C", value: 3, color: "#56ca85" },
                { text: "Clinic D", value: 4, color: "yellow" }
            ]
        }
    ],
    majorTick: 30,
    minorTickCount: 3,
    height: "100%",
    footer: false,
    views: [
        { type: "day", selected: true, dateHeaderTemplate: "<span>#=kendo.toString(date, 'ddd d MMM')#</span>" },
        { type: "week", dateHeaderTemplate: "<span>#=kendo.toString(date, 'ddd d MMM')#</span>" },
        "month",
        { type: "timeline", eventHeight: 30 },
        "agenda"
    ],
    selectable: true
})

Regards,

Gary

Vladimir Iliev
Telerik team
 answered on 24 Mar 2016
8 answers
1.7K+ views
Hello,

Scenario: I have a custom command button on the toolbar of a child grid (created with detailInit()).
The onClick handler of my custom command button should also refresh the datasource of the child grid (only).

Being a newbie with kendo and jquery, I have not yet found out how to select the child grid and get it's datasource.
For the main grid it's simple because you have a unique identifier, but how for the child grid that's dynamically created vi detailInit()?

Thanks for your help.
Erwin
Alexander Valchev
Telerik team
 answered on 24 Mar 2016
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?