Telerik Forums
Kendo UI for jQuery Forum
2 answers
401 views
Hello,

We have a grid bound to a remote datasource using MVVM, and have written a custom popup editor for editing items in the grid/datasource and it's all working well.

We are in the process of extending our application to support multiselect fields. For example, let's say our datasource is employees, and the field in question is certifications. A single employee can have any number of certifications chosen from a predefined list. So, when we click edit for an employee in the grid, we'd like the popup to contain a multiselect where the user can add/remove certifications.

Our first approach was to change the server side code to return an array for the certifications field. We have since learned that the datasource object does not support arrays in fields, and that it seems to automatically convert them to a comma-delimited list. We then considered just using a delimited string instead of an array, but then are unsure how to bind this field to the multiselect widget.

We are open to whatever solution is best, but are not sure what that would be so were wondering if you'd have any advice on how to do this.

Thanks for the help,
--Dan
Dan
Top achievements
Rank 1
 answered on 11 Jul 2014
1 answer
3.1K+ views
This is my template

<script id="itemTemplate" type="text/html">
    # if(data.IsSandbox){ #
        <div class="draft">
    # } else {#
         <div class="live">
    # } #
       # if(data.IsSandbox){ #
            <strong class="text-info">#: Name # (#: ProgramDesignID #)</strong>
        # } else {#
            <strong class="text-success">#: Name # (#: ProgramDesignID #)</strong>
        # } #
 
        <div class='detailcontainer'>
            <div class='date'>
                # kendo.toString(kendo.parseDate(data.DateDetails.StartDate), "dd/MM/yyyy"); #
            </div>
            <div class='details'>
                #: Details.ProgramName #
            </div>
        </div>
    </div>
</script>


So nothing shows up in the .date DIV...

If I change that line to be
# console.log(kendo.toString(kendo.parseDate(data.DateDetails.StartDate), "dd/MM/yyyy")); #

The JS console in my browser shows all the dates properly formatted for me...why are they not rendering as strings in the template?
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 11 Jul 2014
1 answer
238 views
Hi,

I have just purchased 3 licenses for three of my developers. I got the eMail and set up my account. I am not one of the three poeple who will be using the product. How do I grant my three developers access while keeping my own account? Seems I can only name three and then I would n'd be on the list and couldn't manage the licenses when the team changes.

Thanks,

+Ben
Joseph
Telerik team
 answered on 11 Jul 2014
7 answers
610 views
Ever since I updated to Q1 release of kendo I can no longer style the modal view correctly.  Right now I have my modal view html like this:

<div id="globalSaveModal" data-role="modalview" class="modalSave">
    <div data-role="header">
        <div data-role="navbar">
            <span>Save</span>
        </div>
    </div>

    <p id="globalSaveModalMessage" align="center">Save...</p>
</div>

and my CSS class like this:

.modalSave {
    height:  auto;
    width: 100%;
    position: fixed !important;
    top: 0px;
    left: 0px;
}

This worked before Q1 was released.  Not only that, CSS styling are having weird effects.  Fixed no longer works as Fixed should, it instead makes the modal view incredibly tiny and doesn't display any of the text part nor does it position it in a fixed way.  It keeps it in the same spot as if it were still Relative.

Am I missing something with the modal view?  I don't have trouble styling any of the other kendo widgets.  Modalview is the only one that does not seem to behave correctly.
Mark
Top achievements
Rank 1
 answered on 11 Jul 2014
7 answers
2.3K+ views
Hi,

I have two grids on a Popup Edit of another grid and want to move data rows between the two grids on Popup.

As of now able to maintain the check-box check state on the grid during refresh as below.

And I am  looking for is to select the row when the check-box is checked and Unselect  the row when check box is unchecked even when grid is refreshed.

(Note: Grid as of now not at set to  [selectable: "multiple"] and  let me know if this is required.)

$("#availableAgentsGrid").kendoGrid({
        dataSource: agentdataSource,
       dataBound: function () { 

         //On Grid Databound Maintain the state of Checkbox when grid refresh on .
            for (agent in avAgentCheckedarray) {
                if (avAgentCheckedarray[agent]) {
                    $('#'+agent).attr('checked', 'checked');
                }
            }


            //Set agent Check box; Check and Uncheck Action Event
            $('#availableAgentsGrid tbody').on('click', ':checkbox', function () {
                var id = availableAgentGridData.dataItem($(this).closest('tr')).AgentID;
                if ($(this).is(':checked')) {
                    avAgentCheckedarray[id] = true;
                    $('#' + id).attr('checked', 'checked');

                } else {
                    avAgentCheckedarray[id] = false;
                    $('#' + id).removeAttr("checked");
                }
            });

        },//End of Databound
        columns: [
                       { field: "AgentID",
                           title: "<input id='acheckAll', type='checkbox', class='checkbox' />",
                           width: 50,
                           filterable: false, sortable: false,
                           template: "<input type='checkbox' class='checkbox' id='${AgentID}' />" //define template column with check-box and attach click event handler
                       },

  });// End of #availableAgentsGrid  

availableAgentGridData = $('#availableAgentsGrid').data().kendoGrid;

Thanks,
Chatrapathi Chennam












Atanas Korchev
Telerik team
 answered on 11 Jul 2014
1 answer
127 views
I can't figure out what I am doing wrong with this.

Treeview code with inline dataSource defined - this works fine.

var lobTv = $("#linesOfBusiness").kendoTreeView({
            select: function (e) {
                var tree = this;
                var src = tree.dataItem(e.node);
                jobOwnerId = src.LobId;
                isParent = src.HasChildren;
            },
            change: function (e) {
                appsDataSource.read();
            },
            dataSource: {
                transport: {
                    read: {
                        url: apiUrl + "Lob"
                    }
                },
                schema: {
                    model: {
                        id: "LobId",
                        hasChildren: "HasChildren"
                    }
                }
            },
            loadOnDemand: false,
            dataTextField: "LobName"
        });

If I move the dataSource definition out to its own declaration:

var lobDataSource = new kendo.data.DataSource({
            transport: {
                read: {
                    url: apiUrl + "Lob"
                }
            },
            schema: {
                model: {
                    id: "LobId",
                    hasChildren: "HasChildren"
                }
            }
        });

and change the treeview to use the defined datasource:

var lobTv = $("#linesOfBusiness").kendoTreeView({
            select: function (e) {
                var tree = this;
                var src = tree.dataItem(e.node);
                jobOwnerId = src.LobId;
                isParent = src.HasChildren;
            },
            change: function (e) {
                appsDataSource.read();
            },
            dataSource: lobDataSource,
            loadOnDemand: false,
            dataTextField: "LobName"
        });

The data is no longer displayed in the treeview.  When I look at the call/response in firebug, the data is returned correctly.

What am I missing?

Thanks.
Alex Gyoshev
Telerik team
 answered on 11 Jul 2014
4 answers
840 views
Hello,

Scheduler_navigate Event gives e.date. But i would like to get the selected view start and enddate in navigate function. Currently this.view().startDate() and endDate() inside navigate function gives previous date range(before navigate). is there a way to get new date range to requery datasource for current view

Anamika
Rosen
Telerik team
 answered on 11 Jul 2014
7 answers
713 views
I want to add drag/drop functionality to a listview. Therefore I made the items of the listview draggable. As a result of this, the change event is not raised anymore when clicking the items.

$("#listView").kendoListView({
    dataSource: dataSource,
    selectable: true,
    template  : kendo.template($("#template").html()),
    change: function (e) {
        alert('change');
    },
    dataBound : function () {
        $(".product").kendoDraggable({
            hint: function (element) {
                return element.clone();
            }
        });
    }
});


See http://jsfiddle.net/OnaBai/MYbgy/1 for the full example
Kiril Nikolov
Telerik team
 answered on 11 Jul 2014
1 answer
180 views
I am planning to use Panel bars with section of user input fields, a verification will happen for each section and a the image of the panel should show error or success validation result.

How can I change a panel bar image using javascript.

Thanks.
Kiril Nikolov
Telerik team
 answered on 11 Jul 2014
2 answers
84 views
Hi all,

I have a Backbone application with multiple KendoUi [v2013.2.918; kendo.all.min.js] components e.g. Grid, NumericTextBox. To display this value "12,5 h" in a numericTextBox, I use this:

this.$('.kendoHourInput').kendoNumericTextBox({
  format: '#.0 h'
});

For the development Version, not optimized with r.js (requie.js), everything works as expected. For the production Version, after the r.js optimizer, this format breaks the app:

Uncaught TypeError: Cannot read property 'numberFormat' of null

The predefined formats like "c2" or "p" works without a problem. Could it be a problem with the kendo.culture('de-DE') I use? I had similar problems with the library globalize.js, which overrides the kendo.culture. Is there a known dependency to another library who could break the optimized-code? There is a 2nd library with dependencies to globalize.js:

require.js-config
shim: {
    ...
    someLib: {
        deps: ['globalize']
    }
}

There is a forum entry on the kendo site, with a similar problem. The solution should be to load the kendo library before the globalize library. If I take a look to the script-tags on the index.html, kendo comes before globalize. So, this is not a solution that works for me.

For more information, please let me know.

Thanks 

Sascha
Sascha
Top achievements
Rank 1
 answered on 11 Jul 2014
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?