Telerik Forums
Kendo UI for jQuery Forum
1 answer
128 views

Hi, 

 

As my title might suggest, im trying to add a new item to the dataSource without adding it to my grid. the reason being that the status of the new item might not match that of the current datasource.

eg: adding an INACTIVE record to a grid only displaying ACTIVE records.

Thanks in advance, 

Grant

Alex Hajigeorgieva
Telerik team
 answered on 23 Jul 2019
2 answers
523 views
Hi Guys,

Have just tripped over some display issues with multiple column headers when grouping is applied.

To demonstrate the problems please run the following dojo

        https://dojo.telerik.com/IgUxidOQ
        
and should see the grouped column header shows a border line as if it was are multi column header (see Header1.png).

Now if you lock the ContactName column the grouped column displays correctly but the CompanyName header column is missing a left hand border (see Header2.png).

Regards
Alan
    
AGB
Top achievements
Rank 1
Iron
 answered on 22 Jul 2019
3 answers
256 views

Is it possible to retrieve just the cell contents (not formatting, etc) for a specific worksheet?  

We're looking at a use case where we want to use a spreadsheet for loading a mongodb collection and don't care about all the formatting / metadata that seems to be there when you use ToJson.

Thanks!

Dimitar
Telerik team
 answered on 22 Jul 2019
3 answers
326 views

Hello

In the past I was using the fetch operation like this:

var gameObject = new kendo.data.DataSource({
  transport: {
    read: {
      url: "../php/readgamelist.php",
        type: "POST",
        dataType: "json",
        contentType: "application/json; charset=utf-8"
    }
  }
  ,success {}
  ,error {}
});
 
gameObject.fetch (...)

 

I've found out that with the success/error won't work anymore (maybe I'm wrong on success/error anyway and it never really worked properly). Of course in between I have installed newer KendoUI versions. Nevertheless I had to rewrite my code to make it working again:

console.log ('1');
         
var gameObject = new kendo.data.DataSource({
  transport: {
    read: {
      url: "../php/readgamelist.php",
      type: "POST",
      dataType: "json",
      contentType: "application/json; charset=utf-8"
    }
  }
});
 
console.log ('2');
 
gameObject.fetch()
  .then(function(){
    console.log ('3');
    console.log (gameObject.data());
  })
  .catch(function (error) {
    console.log ('4');
    console.log (error);
  });

 

This now works so far as it should. The problem comes up when I will not use the page (with this code) for hours. So there is a kind of server timeout. Calling then this function by page (GUI) will lead into this Browser output:

1
2
TypeError: e.slice is not a function. (In 'e.slice(0)', 'e.slice' is undefined)                 success kendo.all.js  7001

I have no clue why this error is coming up and how to fix that. My server (on which readgamelist.php is stored) can even handle a timeout and would return information about that (by return it to gameObject.data() but it doesn't seem to come to this since "3" is not in the error output. So therefore it won't come to read from the php file.

There is no example to catch an error in your fetch examples but I think I did it the correct way. I'm also confused that kendo.all.js returns from "success". I don't know the current version of Kendo UI I'm using (can't find any version hint in the files but it must be one of the latest one).

What else can I do to catch the real error?

Regards

 

Marin Bratanov
Telerik team
 answered on 22 Jul 2019
1 answer
2.0K+ views

    Hi,

I am displaying a container with a bunch of info, and I am using conditionals to make some of them appear if certain bools return true. This causes an issue with my formatting though because instead of going to a new line when the text appears, it actually appears next to the text that was already there. Is there a way to add a </br> on the binding of the text?

Basically the below checks if the variable exists is true, and if so it sets the variable string to "Success </br>" so that it will add a line break after the text "Success".

var string = null;
if (exists) {
    string = "Success </br>"
}
var returnStatus = kendo.observable({
    status: success
});
kendo.bind($("#status"), returnStatus);
Steven
Top achievements
Rank 1
 answered on 19 Jul 2019
8 answers
434 views
We are thinking to use Kendo grid to allow end users creating personalized view of dashboard wherein we have 20 different columns pertaining to order e.g. OrderTitle, OrderDescription, OrderAmount, DateCreated, DateAuthorized and so on. We have created database view to feed data to KendoDatasource. 
  
WE plan to develop Admin screen that allows and saving to DB(MyViewSettings)

1. choose what columns they want to see on their report(ColumnVisibility checkbox in kendo grid)
2. specify filter criteria(FilterMenu in Kendo grid)
3. specify Group by columns(GroupByHeader in Kendo grid)

How do we save Kendo grid settings when user hits - Save View and load grid based on above settings when they view grid.

Can you provide suitable sample that demonstrates how we can achieve this?
Alex Hajigeorgieva
Telerik team
 answered on 19 Jul 2019
3 answers
1.1K+ views

I need a default value for a field that I get from a datasource, and bind to that field using an observable. (That value can then be updated if needed by the user using a treeview). I can read the initial remote datasource, build the observable and bind the value to the field. I can then pop up a dialog, show a tree and return the values. What I cant seem to do is set the value of the observable because it is based on a datasource, and therefore seems to be a much bigger and more complicated json object which I am viewing in the console. I have also had to bind differently in order to get that working as well as shown below.

Below if just a snippet, but should give an idea. The remote data source returns just: {"name":"a name string"}

<p>Your default location is currently set to: <span id="repName" data-bind="text: dataSource.data()[0].name"></span></p>

<script>
    $(document).ready(function () {

    var personSource2 = new kendo.data.DataSource({
        schema: {
                model: {
                    fields: {name: { type: "string" }}
                }
            },
        transport: {
            read: {
                url: "https://my-domain/path/paultest.reportSettings",
                dataType: "json"
            }            
        } 
    });

    personSource2.fetch(function(){
    var data = personSource2.data();
    console.log(data.length);  // displays "1"
    console.log(data[0].name); // displays "a name string"

        var personViewModel2 = kendo.observable({
        dataSource: personSource2
        });

    var json = personViewModel2.toJSON();
    console.log(JSON.stringify(json)); 

    observName1 = personViewModel2.get("dataSource.data.name");
    console.log("read observable: "+observName1);

    kendo.bind($(''#repName''), personViewModel2);

    });

 

After a lot of playing around, I managed to get the value to bind using: data-bind="text: dataSource.data()[0].name" but I can't find this documented anywhere. Where I output the observable to the console, I get a great big object, not the simple observable data structure I was expecting. I suspect I am missing something fundamental here! I am currently just trying to read the observable above, but can't get it to return the string from the json source.

Petar
Telerik team
 answered on 19 Jul 2019
1 answer
700 views
I have a custom hidden div that appears when the user selects grid content. It sums the selected cells in the amount column and then binds it to this text. The text currently appears under my grid externally. I was actually wonder if there is a way to display that in the header above the column headers kind of like how the Export to Excel button is?
Alex Hajigeorgieva
Telerik team
 answered on 18 Jul 2019
2 answers
195 views

I have a panel bar based on a remote data source which all works fine. One of the attributes in the feed combined with a form field on the screen will determine if either the user can click on a child item in the panelbar and navigate through to the url, or gets a warning dialogue and navigation fails.

I am using the following technique to capture the given json attribute in the feed and associate it with each item in the panel:

 

$("#panelbar").kendoPanelBar({

        dataSource: haRepList,
        template: "<span class=''repType'' data-url=''#= item.type #''>#= item.name #</span>",
        select: function(panel){
           var classId =  $(panel.item).find(".repType").data(''url'');
           if (classId !== ''undefined'') {
           alert(classId);
           }
        },
        dataTextField: ["name", "name"]
    });

 

So when I click on the given item, I get an alert telling me what the type attribute is (just for debugging!). I now need to tell the panel "Do not allow the click through url to work" based upon both this value, and another field on the screen.

Paul
Top achievements
Rank 1
 answered on 18 Jul 2019
2 answers
129 views

Hi!

I am using Kendo diagram on the client and we've managed to do it really easy.

But we had a request for generating the diagram image to include it in reports generated on the server.

Tried to search the API docs and forums for a solution but couldn't find any. 

The current approach we're taking is to load kendo js lib into nodejs to generate the graph and save it. Our problem with this approach is that Kendo depends on jQuery and we can't seem to load it in a way that Kendo would know how to use.

Do you have any suggestion on our approach or a different approach on which we can achieve our result?

iFACTS Admin
Top achievements
Rank 1
 answered on 18 Jul 2019
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
ScrollView
Switch
TextArea
BulletChart
Licensing
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
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?