Telerik Forums
Kendo UI for jQuery Forum
1 answer
228 views

I need a solution for this scenario. In some kendo widgets "this" does not get hijacked (listview for example), but in most others it does.

I have an object:

export class Manager {

     public controlId: string;

     public masterpanel: MasterPanel;

     public detailspanel: DetailsPanel;

     constructor(options: IManagerOptions) {

          this.controlId = options.controlId;

          this.masterpanel = new MasterPanel(guid(), options);

          this.detailspanel = new DetailsPanel(guid(), options);

          kendo.bind($("#" +  this.controlId), this, "");

     }

} 

This is MasterPanel:

export class MasterPanel extends kendo.data.ObservableObject {

     constructor(controlId: string, options: IManagerOptions) {

          this.dataSource = new kendo.data.DataSource({

               data: [] //Assume data here

          });

     }

     public currentParent: IManagerFolder;

     public dataSource: kendo.data.DataSource;

     public masterData: kendo.data.ObservableArray = new kendo.data.ObservableArray([]);

     public onMasterItemClick(e) {

          var selectedItem = e.sender.select();

          var selectedDataItem = e.sender.dataItem(selectedItem);

          this.set("currentParent", selectedDataItem);

     }

     public backToRoot(e) {

          var rootItem = this.masterData[0];

          this.set("currentParent", rootItem);

     }

}

 

These are my templates:

<script id="managerTemplate" type="text/html">

     <div data-role="navbar"      

             data-bind="visible: masterpanel.navBackVisible, events: { click: masterpanel.backToRoot }">

          <div class="manager-navroot-text" data-bind="text: masterpanel.masterData[0].text"></div>

     </div>

     <div data-template="masterListTemplate"

             data-bind="source: masterpanel">

     </div>

</script>

<script id="masterListTemplate" type="text/html">

     <div data-role="listview"  

             data-template="masterItemTemplate"  

             data-selectable="single"  

             data-bind="source: currentParent.childFolders, events: { change: onMasterItemClick }">

     </div>

</script>

<script id="masterItemTemplate" type="text/html">

     <div>#: text #</div>

</script>

So why, when I click the listview, is "this" my masterpanel as expected, but when I click on the navbar, it's the manager?

Rosen
Telerik team
 answered on 06 Oct 2015
4 answers
225 views
Hi There, I have a treeview that I initialize with a datasource, and on the dataBound event (After the tree finishes loading) I select a node within the tree.  This works in both Firefox and Chrome, but it errors in IE 11.  Here is the code I use to initialize the tree.  I have validated that the code is retrieving the correct UID as a string before it tries to select the node. I Bolded the code below where the issue is occurring.  The Error happens on tree.select(item).
 
     $(treeid).kendoTreeView({
    template: kendo.template($("#treeview-template").html()),
    dataSource: myItems,
    loadOnDemand: false,
    dataTextField: ["Name", "Name"],
    select: onSelect,
    dataBound: function (e) {
        var tree = $(treeid).data('kendoTreeView');
            if (itemId !== 0) {
                //select item based on url
                if ($("#" + itemId).length > 0) {
                    var uid = $("#" + itemId).closest("li").data("uid");
                    if (typeof uid !== 'undefined' && uid !== '') {
                        item = tree.findByUid(uid);
                        tree.select(item);
                        tree.trigger("select", {
                            node: item
                        });
                    }
                }
             }
 
        tree.expand(".k-item");
 
    }
});

 

I attached a JPG of the Error I recieve, and also a JPG of the console.log value of the node that gets returned from the findByUid Method.

 

 

 

Nikolay Rusev
Telerik team
 answered on 06 Oct 2015
6 answers
427 views

Hi,

In kendo grid demo,all the records are loaded at the very first time(Ex - 2000 records) itself. After that page size and virtual scrolling option enabled.When i scroll,records are loaded.I dont want this scenario. I need like,I have totally 14000 records. I have to fetch only 50 records and need to bind in grid. After that  when i scroll,next 50 records should get loaded and need to bind..

 

 

 

Kindly help me out.

Nikolay Rusev
Telerik team
 answered on 06 Oct 2015
0 answers
224 views

I am not clear how exactly the grid-datasource (websocket) demo works. Specifically, i am confused about this code:

 

push: function(options) {
    //Listen to the "message" event fired when the server pushes data
    ws.addEventListener("message", function(e) {
        var result = JSON.parse(e.data);
 
        //Check what the push type is and invoke the corresponding callback.
        if (result.type == "push-update") {
            options.pushUpdate(result);
        } else if (result.type == "push-destroy") {
            options.pushDestroy(result);
        } else if (result.type == "push-create") {
            options.pushCreate(result);
        }
    });
},

The documentation says the "The function invoked during transport initialization which sets up push notifications. The data source will call this function only once and provide callbacks which will handle push notifications (data pushed from the server).". So, it seems like the purpose of this push is to set callbacks ? Isn't that what we are doing in the send function ? Before we send any data, we specify callbacks.

 

Secondly, what is this "options"  parameter. As per the documentation its a callback object. But then where are the options.purshCreate(), options.pushUpdate() etc defined ?  What are they doing ?

 

TkNeo
Top achievements
Rank 1
 asked on 05 Oct 2015
2 answers
467 views

Getting a "Uncaught TypeError: Converting circular structure to JSON" on JSON.stringify($("#grid").data("kendoGrid").getOptions()

I tried a variation of simpleStringify but didn't get anywhere.

Yes, I've read the docs, but I have no idea how to implement super-json (if that's the solution) for this.

Help is appreciated! Thanks!

Alex
Top achievements
Rank 1
 answered on 05 Oct 2015
1 answer
655 views

I have dropdownlists in a kendo grid. In IE and Chrome, it all works without issue. In Firefox, the dropdownlist will change to three dots if I shrink the browser width enough. What is the reason for this and how can I have Firefox behave like IE/Chrome where it doesn't change from the dropdownlist to the 3 dots?

See attached of example of what I mean.

 

Plamen Lazarov
Telerik team
 answered on 05 Oct 2015
2 answers
164 views

I am trying group with the angular example here

http://dojo.telerik.com/@ggkrustev/ihUci

 

my datasource is set up the same schema but I am binding like this.  

<select id="ddl"
               kendo-drop-down-list style="width:300px"
               k-filter="'contains'"
               k-data-source="Controller.Data"
               k-options="Controller.options"></select>

 

Is there a way to group by if I am not grouping in the datasource like in the link?

steve
Top achievements
Rank 1
 answered on 05 Oct 2015
1 answer
316 views

I have a tabstrip within a splitter pane but for some reason the horizontal scrolling just doesn't seem to work - I was wondering if this cold be an issue with the splitter pane? I've desperately tried to find someone whos had a similar problem, but to no avail...

 

I've attached a screen shot of what I get when some of the tabs are hidden.  rather than getting the two directional scroll buttons appear as you would expect, Only one of them is visible and it is set to 'unselectable'.  the other direction button is there but its display is set to none by default...and is also 'unselectable'

 

please help!!

Dimo
Telerik team
 answered on 05 Oct 2015
2 answers
336 views

Hi Telerik Team! Is it possible to fill, for example a rectangle, with a color based on CSS class, instead that the hexadecimal code ? I mean, I would like to assign the color of a rectangle based on some colors that change according the theme's color palette, for example the colors displayed in dataviz different series or the color of notifications.But for doing this I have to set a CSS class on fill.color field of the drawing object.

If this isn't possible, do you have any other suggestion to color some drawing object according the theme's color palette?

Thanks !

Mattia
Top achievements
Rank 1
 answered on 05 Oct 2015
5 answers
550 views

Hello,

 I have the Dojo here.

http://dojo.telerik.com/AhINe

I am grouping by the Product column and Price column is text column which the users can edit the numbers.

I need to do the following:

1. I need to show the total of Price in the Group Header Template.

    For example, the group text now shows ABC (Total Price:4). Instead I want it to show ABC (Total Price: 70)

2. Since the Price column is editable, when the user edits the Price I want the Group header text to change.

I have thousands of records and there can be multiple groups. So I cannot practically refresh the grid to change the datasource.

3. I need to collapse few groups when loading the grid.  I am using a jquery approach and instead I want to be able to do this in angular.

 

Thanks.

Boyan Dimitrov
Telerik team
 answered on 05 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?