Telerik Forums
Kendo UI for jQuery Forum
1 answer
194 views

Is multi filter supported for treelist columns or is there another way to do this?

Filterable(f => f.Multi(true)) 

 

Kiril Nikolov
Telerik team
 answered on 02 Nov 2015
1 answer
189 views

Hi guys,

 

I've been struggling with this for several hours with no luck. I have this grid with batch editing enabled and I have two buttons that need to be hidden conditionally depending on the value of a property in my ViewModel. I'm using the dataBound event to hide the buttons and everything works fine until I edit one of the cells in the grid. As soon as I change the value on a cell and exit the edit mode the button that was hidden appears again. How can I solve this?

 

Thanks in advance.

Dimiter Topalov
Telerik team
 answered on 02 Nov 2015
3 answers
1.0K+ views

When setting a value to an object in the model, the following error appears:

            Uncaught TypeError: Cannot read property 'open' of null

The stack trace finishes with this line:

            Widget.extend._createContentElement @ kendo.web.js:67057

that on the kendo.web.js translates to the following

             doc.open();

The stack trace starts with this line:

              vm.homework.set("timetableId", -1);​

The vm object is the "virtual model" it is an instance of the kendo.observable model, homework is an object of the model, it is check if it's initialize before setting it like this:

 if (vm.homework !== undefined) {
            vm.homework.set("id", -1);
            vm.homework.set("timetableId", -1);

            vm.homework.set("title", "");

What is weird is that the "vm.homework.set("id",-1)" doesn't throw the exception.

I tried changing the set to "vm.homework.timetable=-1" it does not throw the error, but the error persist on the next "set" line.

I'll attach a screen shot of the hole stack trace.

The kendo.observable is set like this:

models = (function (models) {
    models.homeworkModel = kendo.observable({
        homework: {
            id: -1,
            timetableId: -1,
            title: "",
            details: "",
            availableTime: new Date(),
            dueDate: new Date(),
            lessonGroupId: null,
            isLessonAssign: true,
            links: [],
            homeworkStudents: [],
            homeworkResources: []
        },

        lesson: -1,

        //Behaviour
        init: init,
    });

    var vm = models.homeworkModel;

    return models;

function init(lessonId) {
        $.blockUI();
        resetVm();
        vm.homework.set("timetableId", lessonId);
        vm.set("lesson", lessonId);
    }

function resetVm() {
        if (vm.homework !== undefined) {
            vm.homework.set("id", -1);
            vm.homework.set("timetableId", -1);
            vm.homework.set("title", "");
            vm.homework.set("details", "");
            vm.homework.set("availableTime", new Date());
            vm.homework.set("dueDate", new Date());
            vm.homework.set("isLessonAssign", true);
            vm.homework.set("lessonGroupId", null);
            vm.homework.set("links", []);
            vm.homework.set("homeworkStudents", []);
            vm.homework.set("homeworkResources", []);
        }
    }

})(typeof models != "undefined" ? models : {});​

 
Petyo
Telerik team
 answered on 02 Nov 2015
3 answers
280 views

Hi there,

I have a scheduler enabled in week and day view.  Each 1hr period per day has 1 item returned which is a template to encapsulate the items for that date (we couldn't use it out of the box before of our peculiar client requirements which require it to be very dynamic) - which works fine, but the result is that a lot of markup is returned via JSON from my controller.  It all works fine in day view, but in week view after adding more than a few days' worth of items the .read() method from javascript I call after an item is removed or added stops working - the spinner fires and the controller method is hit correctly, but it never re-renders the scheduler with the updated data.

I suspect it's a limit being hit somewhere - is there such a thing for the scheduler, as I can't find one anywhere?

Or do you have any advice for a better way to achieve this scenario?  I could return more raw data rather than HTML from the controller, but I'd essentially need to loop through multiple items inside an individual scheduler item and apply a template for each, which I don't think is possible?

Thanks,

Mark

Vladimir Iliev
Telerik team
 answered on 02 Nov 2015
1 answer
213 views

 

I'd like to use the spreadsheet widget, but via angular. I tried something like this:

    <div class="container-fluid" ng-controller="planner.PlanEditorController as shot_planner">

        <H1>Planner</H1>

        <kendo-spreadsheet style="height:580px;" options="planner.spreadsheetOptions"></kendo-spreadsheet>

    </div>

 

 but it doesn't seem to be working (the directive is not recognized).

 Any ideas?

 

Thanks,

John

 

 

John
Top achievements
Rank 1
 answered on 30 Oct 2015
3 answers
1.6K+ views

Details about my grid:

Kendo version 2014.2.716

Grid has the following features:Configured by Razor GridBuilder, loaded via ajax, no page size (grid scrolls internally), grouped, each row has an expandable detail row, and 6 monetary columns are aggregated, with aggregates shown in both the group footer and grid footer.

Problem: We want aggregates to update whenever you change a value in the grid.

Solution #1: Consensus seems to be to call e.sender.dataSource.fetch();  That worked, but had the following consequences:

(1) Clears dirty indicators in cells, (2) Clears any open detail rows, (3) Opens any collapsed groups.

We can solve all three of those problems manually, but it's getting to the point where I wonder if just manually updating the aggregates, for finding another way other than re-fetching would be a better solution than hacking the grid back to its pre-fetch state.  What made it extra difficult is the rows and cells are all re-created, so it's not as easy as just tracking a list of dirty cells, and marking them dirty again; you'd have to track the rowid/cellindex pair, and find the equivalent new cells.

Does anyone have any suggestions?

Dale
Top achievements
Rank 1
 answered on 30 Oct 2015
8 answers
2.9K+ views

Is it possible to use the DataSourceRequest object as an action method parameter? What I've got currently is a grid that loads data, but then won't filter or sort. The paging seems to work.

I'm using Kendo UI verison 2015.3.930.

Thanks!

Aaron
Top achievements
Rank 1
 answered on 30 Oct 2015
1 answer
120 views

Hello,

 I would like to hide/show a filter input for a mobile list view dynamically (in JS). I have succeeded it using  $("#myMobileListView").getKendoMobileListView()._filter._clearFilter();

and hiding/showing the element with ".km-filter-form" class. Is there any bettter way using public methods?

Thanks,

Petyo
Telerik team
 answered on 30 Oct 2015
7 answers
533 views
Hello,

I have problem with grid reload data in IE. In Firefox grid is working OK.
When page is first time loaded grid is populated, but on F5 page reload is not working...
Also manual data source reload on Resync Button is not working in IE...

Any Help?

Best Regards

Code:
var model = new kendo.data.Model.define({
    id: "id"
});
 
var ds = new kendo.data.DataSource({
        transport: {
            read: {
                dataType: "json",
                url: "../lib/get_wifi_users.php"
            },
            schema: {
                model: model
            }
        },
        pageSize: 10
});
 
$("#grid").kendoGrid({
    dataSource: ds,
    sortable: true,
    selectable: "multi",
    pageable: true,
    columns: [
        {field: "user", title: "User", template:"<span class='user'>#= user #</span>" } ,
        {field: "wlanId", title: "Wlan ID"},
        {field: "userType", title: "User Type"} ,
        {field: "lifetime", title: "Lifetime"},
        {field: "startTime", title: "Start Time"} ,
        {field: "remainingTime", title: "Time Remaining"},
        {field: "description", title: "User Description"}
    ],
    height: 325
  });

   // Resync Button
    $("#reSync").button({
        icons: {
            primary: "ui-icon-arrowreturnthick-1-s"
        }
    }).click(function() {
            // Resync dataSource from WLC
            ds.read();
          
        });
Harry
Top achievements
Rank 2
 answered on 30 Oct 2015
14 answers
860 views
Hello,

I'm starting to play around with the new excel export functionality and have questions for a couple of different scenarios where I'm looking for some guidance on how to approach them. 

First scenario: We use the MVC foreign key columns pretty frequently in our grids.  We have a numeric identity column that then ties to another table which contains the display value for the column.  When I try the export the numeric identity value is what shows up in the resulting document.  Is there a way to tell the export to use the display value instead?

Second scenario: We have a grid that uses a detail template which contains a sub-grid.  Is there a way that I would be able to have the sub-grids included in the export?

Thanks in advance for your advice.

Regards,
Brian
Daniel
Top achievements
Rank 1
 answered on 30 Oct 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?