Telerik Forums
Kendo UI for jQuery Forum
1 answer
117 views
Hello,

I want to create class in C# that will contain the recurrence properties of the task from the string "recurrenceRule". Can you give me the model of the class that contains the repeater in timeline so I can serielize it.

Also i want to ask you if i can change the options in the modal of the task if so can you please give me an example.
Georgi Krustev
Telerik team
 answered on 02 Apr 2015
1 answer
644 views
I am creating an MVC 5 app in VS 2013.

I have a master view that calls a partial view for a model. That partial view has several controls related to a "relationship", including a button for the user to click to create a record for a new organization with which we have a relationship in case that organization does not yet exist in our records.

When the user clicks the button, a Kendo modal window (partial view) pops up and display controls for the user to fill in for the new organization. One of those controls is a Razor @Html.DropDownListFor() which displays the cities and counties.

So far, so good.

The "city" dropdown (Razor @Html) has text in the pattern City;County. When the user selects a City/County, I want to put the city value into the city box (the same select, for now, but it could be a different control) and the county name into the the CountyName textbox.

The code for the DropDownList/(HTML Select) is

@Html.DropDownListFor(model => model.City, @CityCountySelectList, new
   {
       htmlAttributes = new
       {
           @class = "form-control",
           title = "Select city and county simultaneously",
           onchange = "javascript:GetStringElement(value, 0, ';')"
       }
   })


But the javascript is never called (based on my step-through debugging in Chrome). I have tried the JavaScript call with and without "javascript:" and put the GetStringElement function in various places to no avail:

1. @scripts on the main and calling view
2. <script> on the main and calling view
3. in the document.ready function for the modal window.
4. On a separate javascript file.
5. Inline in the onchange event.

The code to call the modal is:

            <div id="KendoOrgModal">
                <p>Don't see your organization in the list? <span id="new_org_btn" class="k-button">Add a new one</span></p>
                @*re: modal window scrolling against main window: http://www.telerik.com/forums/kendo-ui-window-disable-background-scrolling *@

                @(Html.Kendo().Window()
                .Name("new_org_window")
                @* CSS width determines total display width for controls *@
.HtmlAttributes(new { style = "width:64em; overflow:hidden;" })
                .Title("New Organization")
                .Content("loading form...")
                .LoadContentFrom("_Create", "Org")
                .Iframe(false)
                .Draggable()
                .Visible(false)
                .Resizable(opts => opts.Enabled(false))
                .Height(875)
                @* width property determines width of popup modal window *@
.Width(890)
                .Scrollable(false)
                .Events(events => events
                    .Close("on_org_window_close")
                )
                )

                <script>


                    function on_org_window_close(e)
                    {
                        var org_cmb = $("#EditModel_CRAOrgID").data("kendoComboBox")
                        org_cmb.dataSource.read();
                        org_cmb.refresh();
                    }

                    $(document).ready(function() {

                        $("#new_org_btn")
                            .bind("click", function() {
                                $("#new_org_window").data("kendoWindow").open();
                            });

                    });

                </script>
            </div>

How can I make the DropDownListFor call the JavaScript code?








Ralph
Top achievements
Rank 1
 answered on 01 Apr 2015
8 answers
570 views
Basics of what I am doing (Destroying and recreating)
Destroy  $('#gmap3_container').gmap3('destroy').remove();
Create    $('#tabstrip-home').append('<div id="gmap3_container"></div>');

I basically have a map that I want to destroy when the view leaves and append it back when the view is opened.


 The Problem:
Now this below works if data-stretch is off, but with it enabled, there are problems appending the object back into the view once it's been initialised. I am wondering if I can apply data-stretch specifically to the style of the gmap3_container somehow?
           

My view:

<div data-role="view"  id="tabstrip-home" data-title="Map" data-init="startMap" data-stretch="true">
<div id="gmap3_container"></div>
</div>





Petyo
Telerik team
 answered on 01 Apr 2015
5 answers
383 views
Hello.
I've just tried these settings in the grid options:

var persons = [
    { FirstName: 'Andy', MiddleName: 'Albert', LastName: 'Arbuckle' },
    { FirstName: 'Bob', MiddleName: 'Bertrand', LastName: 'Barrington' },
    { FirstName: 'Carl', MiddleName: 'Cuthbert', LastName: 'Carruthers' }
];
 
$('#grid').kendoGrid({
    dataSource: { data: persons },
    columns: [
        { field: 'FirstName', title: 'First Name' },
        { field: 'MiddleName', title: 'Middle Name', hidden: true },
        { field: 'LastName', title: 'Last Name' },
    ],
    selectable: 'multiple cell',
    allowCopy: true
});


It works nicely other than the fact that hidden columns are copied as empty cells.
Is this expected functionality?
(My preference would be to not copy the middle cell - I don't think that empty cells add any value)
Thank you.
Petur Subev
Telerik team
 answered on 01 Apr 2015
2 answers
267 views
I have a
Kiril Nikolov
Telerik team
 answered on 01 Apr 2015
2 answers
120 views
I get errors when i try to use a dataSource for multi checkbox:

Works:
filterable: {
    multi: true,
    dataSource: new kendo.data.DataSource({
        transport: {
            read: {
                url: Routing.generate('some_url'),
                dataType: 'json'
            }
        }
    })
}

Doesn't work:
filterable: {
    multi: true,
    dataSource: {
        transport: {
            read: {
                url: Routing.generate('some_url'),
                dataType: 'json'
            }
        }
    }
}

Console output:
"Uncaught TypeError: Cannot read property 'model' of undefined"

With the working snippet i have another problem:
The multi checkbox filter is correctly filled with values from the given URL, but if i click on button "Filter" nothing happens. There's no error, it just doesn't fire up the main request of the grid.

The gridconfig (model and columns are strongly reduced):
var productModel = kendo.data.Model.define({
    id: 'id',
    fields: {
        'someField': {type: 'string'}
    }
});
var productColumns = [
    {field: "someField", title: "some field",
        filterable: {
            multi: true,
            dataSource: {
                transport: {
                    read: {
                        url: Routing.generate('some_url'),
                        dataType: 'json'
                    }
                }
            }
        }
    }
];
$scope.mainGridOptions = {
    columnMenu: true,
    columns: productColumns,
    dataSource: {
        transport: {
            read: {
                url: Routing.generate('get_products'),
                dataType: 'json',
                cache: false
            }
        },
        pageSize: 50,
        serverPaging: true,
        serverFiltering: true,
        serverSorting: true,
        schema: {
            total: 'total',
            data: 'data',
            model: productModel
        }
    },
    /*filterable: {
        extra: false,
        mode: "menu, row"
    },*/
    filterable: true,
    groupable: false,
    height: $('.product-index-grid').height(),
    pageable: {
        pageSizes: [25, 50, 100, 250],
        buttonCount: 5,
        refresh: true
    },
    reorderable: true,
    resizable: true,
    scrollable: true,
    sortable: true
};

Any help would be great!
Onlineprinters
Top achievements
Rank 1
 answered on 01 Apr 2015
3 answers
139 views
Hello,
What's the best practice and the correct way to access child or sub properties on objects inside viewmodel.

For instance, in a viewmodel I have, it contains an object "curRec". this object has sub properties for instance, "curRec.assessment" (object) or "curRec.actions" (array).

In the viewmodel, shall I use this: this.get("curRec").assessment / this.get("curRec").actions or this.get("curRec.assessment") / this.get("curRec.actions") 

Thanks
Petyo
Telerik team
 answered on 01 Apr 2015
4 answers
3.4K+ views
Hi,

I found a strange behaviour of the numerictextbox's change event. If I change the value of the widget from code it doesn't fire the change event:
<body>
  <input id="numerictextbox" />
  <script>
  var textBox = $("#numerictextbox").kendoNumericTextBox({
    change: function() {
        var value = this.value();
        alert(value);
      }
  }).data("kendoNumericTextBox");
   
    textBox.value(12345); // this should fire change event.
  </script>
</body>
 Is it by design behaviour, or is it a bug?
Bilal
Top achievements
Rank 2
 answered on 01 Apr 2015
3 answers
494 views
For my pie chart, I have turned off the highlight for the legend. How also can I change the cursor to default when the mouse hovers over the legend - since there is no highlight and no action when clicking on the legend item?

Thanks,
--Ed
Iliana Dyankova
Telerik team
 answered on 01 Apr 2015
1 answer
328 views
Hello,
i use kendo UI menu and use a menu only with icons like this ...

<ul id="menu">
   <li><i class="fa fa-user"></i>
      <ul>
         <li><i class="fa fa-xxxxx"></i></li>
         <li><i class="fa fa-xxxxx"></i></li>
         <li><i class="fa fa-xxxxx"></i></li>
      </ul>
   </li>
</ul>

I use icons from fontawesome.

Is there anyway to use tooltips using $("#menu").kendoMenu() ? 

Regards.

Jürgen



Iliana Dyankova
Telerik team
 answered on 01 Apr 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?