Telerik Forums
Kendo UI for jQuery Forum
1 answer
258 views

Hiya,

I was trying to disable a button inside a toolbar using the code below (code snippet from http://demos.telerik.com/kendo-ui/toolbar/api ):

$(".toggleRepeat").click(function() {
    var toolbar = $("#toolbar").data("kendoToolBar"),
        repeatButton = $("#repeat"),
        isDisabled = repeatButton.hasClass("k-state-disabled");
 
    toolbar.enable(repeatButton, isDisabled);
});

After looking at the developer tools and inspecting the said button, I noticed it is not marked as aria-disabled. Is there a way to achieve this?

Kind regards, Byang

Alexander Valchev
Telerik team
 answered on 26 Apr 2016
1 answer
232 views

I need to create a list of menu items server side and then bind to the kendo menu, but I am unable to create items with child items.

View:

@model IEnumerable<MenuItem>
 
@(Html.Kendo().Menu()
          .Name("Menu")
          .BindTo(Model))

I was unable to find a way to make childOne and childTwo children of the parent menuItem and added to the allMenuItems list

The allMenuItems is what I am passing to the View

var parent = new MenuItem() {Text = "Parent"};
var childOne = new MenuItem() { Text = "Child 1", ActionName = "Foo", ControllerName="Bar" };
var childTwo = new MenuItem() { Text = "Child 2", ActionName = "Foo2", ControllerName = "Bar" };
 
var allMenuItems = new List<MenuItem>();

I need some sample code showing how to build this list server side.

Thank you.

Alexander Popov
Telerik team
 answered on 26 Apr 2016
11 answers
1.5K+ views
The attached picture1 is what I want to achieve. In the grid there is a list for students and their favorite fruits. The favorite fruits list only for text, in database they are saved as comma seperated numbers such as 1,2,3, and in the data source schema, there is a column for it named fids. And for the fruits, there is a table in database, and an additional odata source for it.
 In the popup editor, I only want to change their favorites not others, and the popup editor is implemented as checkboxes list, just like attachment picture2. The checkboxes list is initialized in the edit event of the gird. In the grid edit event, I have the following code:


  edit: function (e) {
        $("#fruitLists").css({ 'overflow-y': 'scroll', 'width': '280px', 'height': '170px' });

        var checkboxes = '';
        var fruitArray = e.model.fids.split(",");
        var data = that.fruitDataSource.data();
        for (var i = 0; i < data.length; i++) { //generate checkboxes list
            var checked = fruitArray.indexOf(data[i].id + '') > -1 ? "checked" : "";
            checkboxes += "<input type=\"checkbox\" name=\"fruitIdent\" value=\"" + data[i].id + "\" " + checked + " />" + data[i].name + "<br />\n";
        }
        $("#fruitLists").html(checkboxes);

        e.container.find(".k-button.k-button-icontext.k-primary.k-grid-update").click(function () {
            var checkedItems = [];
            $("input[name='fruitIdent']:checked").each(function () { checkedItems.push($(this).val()); });
            e.model.fids = checkedItems.join();

            //update favorite fruits...

            $("#grid").data("kendoGrid").saveRow();           
        });        
    },

My template for popup editor:
<div class="k-edit-form-container" id="popEditor">
    <script id="popup_editor" type="text/x-kendo-template">
        <div id="fruitLists" style="margin-left:35px">

        </div>
</script>
</div>


And the schema for students list:
    model: {
        id: "id",
        fields: {
            id: { type: "number", nullable: false, editable: false },   //headmap
            name: { type: "string", nullable: true },
            favorits: { type: "string", nullable: true },
            fids: { type: "string", nullable: true },
        },
    },

The curious is that, each time I click the Update button, it always trigger data source - transport's create event, not update event. Why? I searched this forum, many guys says that it is because the schema has no id or the popup UI has no id, but even I added the id field, only create event is fired with a null model. 

Why my approach does not work? Is there any solution? Thansk.


Alexander Valchev
Telerik team
 answered on 26 Apr 2016
1 answer
213 views

Hello,

I have a form page with several dropdowns. Each dropdown has a different schema with different field names. I have seen this example of inline templates for non-MVVM dropdowns. http://demos.telerik.com/kendo-ui/dropdownlist/template

I was wondering if a similar option is available for MVVM dropdowns? I would like to include the template inside the HTML attributes instead of as a script block.

Petyo
Telerik team
 answered on 26 Apr 2016
6 answers
359 views

I try to add Data Validation to a range with List as validation type.

- first row is disabled to show column titles

- my validation range is B2:B50

Data validation for the first cell (B2) is working, but oher cells in B column does not work.

Can you help me ?

The code:

<div id="spreadsheet" style="width: 100%;"></div>

$(function () {
    var spreadsheet = $("#spreadsheet").kendoSpreadsheet({
        toolbar: false,
        //sheetsbar: false,
        sheets: [
            {
                rows: [
                    {
                        cells: [
                            { value: "Fonds" },
                            { value: "Sens" },
                            { value: "Code" },
                            { value: "Quantité" },
                            { value: "Cours" }
                        ]
                    }
                ]
            },
            {
                name: "ListAchatVente",
                rows: [
                    {
                        cells: [
                            {
                                value: "A"
                            },
                            {
                                value: "V"
                            }
                        ]
                    }
                ]
            }
        ]
    }).data("kendoSpreadsheet");
 
    var range = spreadsheet.activeSheet().range("1:1");
    range.enable(false);
 
    var columnSens = spreadsheet.activeSheet().range("B2:B30");
    columnSens.validation({
        dataType: "list",
        from: "ListAchatVente!A1:B1",
        allowNulls: true,
        type: "reject",
        titleTemplate: "Valeur invalide",
        messageTemplate: "Valeur autorisée: 'A' ou 'V'."
    });
});

 

T. Tsonev
Telerik team
 answered on 26 Apr 2016
2 answers
59 views

http://jsfiddle.net/hectorcaban/0L2L8nx6/1/

 

the jsfiddle above is showing data placed in the wrong category. 

372000000 should be on phase 2b instead of Phase1b

 

Any help would be greatly appreciated. 

 

 

Iliana Dyankova
Telerik team
 answered on 26 Apr 2016
0 answers
268 views

This is for anyone who is having trouble upgrading Kendo in a project used by TFS (our is TFS 2013). Besides taking forever, the upgrade wizard never worked. I would get a "TF10210: Source control encountered an error during delete operation: Exception of type 'System.OutOfMemoryException' was thrown." message.

  1. Unbind from TFS. (File, Source Control, Change Source Control - choose unbind)
  2. Run Upgrade Wizard to completion.
  3. Rebind to TFS (File, Source Control, Change Source Control - choose bind)

HTH!

Alex
Top achievements
Rank 1
 asked on 25 Apr 2016
2 answers
244 views

I've tried various methods of using template bound data with Url.Action with no luck.

<script type="text/x-kendo-template" id="kendo-template">

<a href='@Url.Action("action", "controller", new { id = "#=id"}'>Click me</a>

<script>

It seems that the # character gets encoded, so kendo is not able to render the template with the correct id.

How may I use the kendo-template together with the Url.Action helper?

Petyo
Telerik team
 answered on 25 Apr 2016
2 answers
427 views

Hi Everyone,

I am trying to remove the tools from the inline editor but even without a single tool, the tool bar still displays. Is there any way to remove/disable that?

Here's how I definte the tools and below is a sample Dojo:

 $("#inlineEditor").kendoEditor({tools:[]});

http://dojo.telerik.com/@dannycabrera/IXAQu

Thanks
Warren
Top achievements
Rank 2
 answered on 25 Apr 2016
2 answers
121 views

Hi , 

I'm trying to see how can I add a ng-click attribute to a button inside a split button. I already saw an example of how to do it via template for a regular button but for this doesn't seem to work or Im missing something.

Thanks!

 

Developer
Top achievements
Rank 1
 answered on 25 Apr 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?