Telerik Forums
Kendo UI for jQuery Forum
20 answers
305 views
Hi,

As basic as this question may seem, I've been wrestling with it for several days with no solution. I have a chart where I was once using a datasource. I am no longer using a datasource and would like to manually add the series with its data to the chart via chart.options.series.push and chart.options.navigator.series.push. Currently, when I add a series to the chart through chart.options I can see the line series. I am trying to add that same series to the navigator using chart.options, but the navigator doesn't show the series. In fact, the navigator is not even visible. Here is my chart creation and addseries function code. Please help!

Thanks much,
Tonih

function createChart() {
                     
                    $("#chart").kendoStockChart({
                         
                         
                        tooltip: {
                             visible: true,
                             shared: true,
                             background: "white",
                        },
                        seriesDefaults: {
                            type: "line",
                        },
                         
                        valueAxis: {
                            name: "straight",
                            visible: true,
                            labels: {
                                format: "{0}%"
                            }
                        },
                        navigator: {
                          series: [{
                            type: "line",
                            width: 1,
                            missingValues: "interpolate",
                          }],
                          categoryAxis: {
                              baseUnit: "yearly",
                              majorTicks: {
                                  visible: "false",
                                  color: "white",
                              },
                              minorTicks: {
                                  size: 3,
                              },
                          }
                        }
                    });
                }
 
 
 
function addSeries(){
             
                     
                    var chart =  $("#chart").data("kendoStockChart");
                    var chartOptions = chart.options;
 
 
                    chartOptions.series.length = 0;
                 
                     
                    for( series in plotSeriesCollection){
                        var name = plotSeriesCollection[series].id;
 
                        var data = [];
 
                        for(obs in plotSeriesCollection[series].observations){
                            data.push(plotSeriesCollection[series].observations[obs].obsValue);
                        }
                         
                        var timePeriod = [];
                        for(time in plotSeriesCollection[series].observations){
                            timePeriod.push(plotSeriesCollection[series].observations[time].obsTime);
                        }
                        chartOptions.categoryAxis = {"categories": timePeriod, "labels": {"step": 60}, "baseUnit": "days", "crosshair": {"visible": true, "color": "silver"}, "type": "date", "majorTicks": {"visible": "false"}, "minorTicks": {"visible": "false"}};
                         
                         
                         
                        chartOptions.series.push({"name": name, "color": "red", "axis": "straight", "data": data, "width": 1, "missingValues": "interpolate", "markers": {"visible": false}});
                        chartOptions.navigator.categoryAxis = {"categories": timePeriod, "labels": {"step": 60}, "baseUnit": "days", "crosshair": {"visible": true, "color": "silver"}, "type": "date", "majorTicks": {"visible": "false"}, "minorTicks": {"visible": "false"}};
                         
                        chartOptions.navigator.series.push({
                            "name": name,
                             axis: "_navigator",
                             type: "area",
                            "color": "red",
                            "data": data
                        });
                    }
                     
                 
                    chart.redraw();
                }
Tonih
Top achievements
Rank 1
 answered on 09 Oct 2013
0 answers
130 views
Hi
I want to be able to get all the files from all directories at a particular location on a virtual cluster. What is the best way to do that. Following that, I also want to be able to view the data in each file in a tabular format or a histogram, such that the UI looks nice. I want to be able to use REST api's to do this.

Any ideas?

Thanks,
Kinnary
Kinnary
Top achievements
Rank 1
 asked on 09 Oct 2013
2 answers
114 views
I have created an example here. jsfiddle If you type 'z' or any invalid date and click the button the message covers the images used in the control. I tried to create a span tag to display the message but that did not work. Please help.
Todd
Top achievements
Rank 1
 answered on 09 Oct 2013
2 answers
531 views
Hi,
I m  using kendo Hierarchy  grid. In child grid I put a "edit" button. So I need to get child row first column data (ID) when I click the edit button.
 My detailInit function and clickbfunction is here.

function detailInit(e) {                       
             var    _Po_sectionID =e.data.SectionID;
                                    $("<div/>").appendTo(e.detailCell).kendoGrid({
                                        dataSource: {
                                            transport: {
                                                read: _PostionsBySectionUrl + _Po_sectionID
                                            },
                                            schema: {
                                                data: "Data",
                                                total: "Count"
                                            },                                    
                                        },
                                        scrollable: false,
                                        sortable: true,
                                        pageable: true,
                                        columns: [
                               
                                            { field: "ContainerID", title: "Possition ID",hidden:true },
                                            { field: "ContainerName", title: "ContainerName",hidden:true  },
                                            {
                                                title: "Action", width: 95, command: [
                                                          {
                                                              id: "edit",
                                                              name: "edit",
                                                              click: OnPositionRowSelect,
                                                              template: "<a class='k-button k-grid-edit' href='' style='min-width:16px;'><span class='k-icon k-edit'></span></a>"
                                                          }                                                       
                                                    ]
                                                },
                                        ]
                                    });
 } 

 function OnPositionRowSelect(e) {
                 e.preventDefault();
                 _ _ _ _ _  _ _ _ _ _   _ _ _ _ _  _ _ _ _ _  _ _ _ _ _
                 _ _ _ _ _  _ _ _ _ _   _ _ _ _ _  _ _ _ _ _  _ _ _ _ _
                _ _ _ _ _  _ _ _ _ _   _ _ _ _ _  _ _ _ _ _  _ _ _ _ _
               _ _ _ _ _  _ _ _ _ _   _ _ _ _ _  _ _ _ _ _  _ _ _ _ _
               alert("Container Id : "+ ContainerID);

 }

Regards


Håkan
Top achievements
Rank 1
 answered on 09 Oct 2013
10 answers
2.0K+ views
I have a Kendo Grid and am using MVVM.  I have my solution working for all CRUD operations more or less. One thing I was wondering is how do I manage server side validation errors in the grid when using MVVM.  For instance if I add a new record which calls a web service to save.  If the WS raises an error saying a record already exists with the same values or similar then how do I go the following:

1) Catch the error and display to the end user
2) Prevent the row from being added to the grid (I wouldn't want to copy the update to the model in this case).

The web service call will still succeed with a 200 http code however it will return a flag indicating there was a validation failure.  My data source code is like:

var paramDataSource = new kendo.data.DataSource({
            schema: {
                data: function (data) { //specify the array that contains the data
                    return data || [];
                },
                model: { // define the model of the data source. Required for validation and property types.
                    id: "PARAMETER_ID"
                },
                errors: "error"
            },
            error: function(e) {
                alert(e.errors);
                },
            pageSize: 10,
            batch: false,
            transport: {
                read:
                {   
                    url: "/UserParameter/GetData",
                    dataType: "json"
                },                
                update: {
                    url: "/UserParameter/Edit",
                    type: "POST" ,
                    dataType: 'json'
                },
                create: {
                   url: "/UserParameter/Create",
                    type: "POST" ,
                    dataType: 'json'
                }
            }
        });



// Create an observable object.
        var vm = kendo.observable({
            userParams: paramDataSource
        });

        kendo.bind($("#userParams"), vm);        
Ivan ORdoñez
Top achievements
Rank 1
 answered on 09 Oct 2013
1 answer
460 views
Hi,
   I have a requirement which is as follows.
   I would want to add new rows to the grid and there should be a serial number which should get incremented automatically. Please let me know whether this can be achieved in Kendo grid. I am working on the HTML version and not on the MVC version. A sample in the HTML version would be great.
Regards,
Vijay
Alexander Popov
Telerik team
 answered on 09 Oct 2013
1 answer
127 views
We need to display a custom content in the grouping cells (the empty leftmost indentation cells in data rows). Currently it is impossible since the cells are rendered "statically":
337.function groupCells(count) {
338.    return new Array(count + 1).join('<td class="k-group-cell">&nbsp;</td>');
339.}

Currently I insert my cell content AFTER the rows are rendered using $('.k-group-cell', row).html(...). But, you know, it is far not the best approach.

Please implement a grid option, say, as follows:
groupCellTemplate:string|object (default: '&nbsp;')
it won't be too hard. And let me know if you would like me to contribute.

Thanks
Alexander Valchev
Telerik team
 answered on 09 Oct 2013
1 answer
87 views
Dear Telerik Support

We are in the upgrading process of adjusting our app to meet the iOS7 style.
Custom icons are used within TabStrip, with the newest Version v2013.2.1002 we are facing the issue that these icons don't get proper active states.

To help you, that you can help us I've created a sample so that you can reproduce the issue. Its based on your standard TabStrip example.
Please note that the problem only appears when using the app on an iPhone or in the iPhone Simulator from Xcode. In Chrome / Ripple everything is fine.

As you see in the attached screenshot, the active TabStrip element changes the text-color but the icon stays the same. Surprisingly the icon gets colored right when you click on an input box on the according content page. But even then, all custom icons change their color. Using the normal icons from the font like the globe works as it should.

You find the example and two screenshots which are showing the wrong behavior in the attachments.
Would be awesome to have a solution or workaround soon.
Best Regards
Gilles
Kiril Nikolov
Telerik team
 answered on 09 Oct 2013
2 answers
965 views
Hi,
I need text of all selected nodes in the Treeview (Checked) in an array.

I can traverse through the selected nodes but not able to read text. text property not working

$("#treeview .k-item input[type=checkbox]:checked").closest(".k-item").each(function () {
// change whatever you want, for example:
**alert($(this).data.text);**
$(this).css("color", "green");
});


Thank You.
Best Regards.
Hardeep
Top achievements
Rank 1
 answered on 09 Oct 2013
2 answers
129 views
Hello, 
i have a standard grid like this:
@(Html.Kendo().Grid<ItemModel>(Model)
  .Name("Grid")
  .Columns(columns =>
  {
    columns.Bound(p => p.Name).Title("Name");
  })
)
My model looks similar to this: 
class ItemModel
{
  string Name;
  Item Items[];
}
 
class Item
{
 string Name;
 DateTime Created;
}
Page Model contains an array of ItemModel and i would like to display the Items field as a separate grid for each corresponging ItemModel.
Is it possible to achieve this in an easy way (preferably setting and filtering data source straight from the page Model, since it is already loaded in) ?
I was fooling around a lot with provided examples, but i wasn't able to fill the hierarchic grid with the right data. 
Thank you for any suggestion.

Rostislav Striz

Vladimir Iliev
Telerik team
 answered on 09 Oct 2013
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?