Telerik Forums
Kendo UI for jQuery Forum
1 answer
180 views
Using 2013.9.18

I'm defining a kendoScheduler with 
timezone: "Etc/UTC"
It works great, in my database the times are stored in UTC and depending on whether I load the page in San Francisco (GMT+7) or Minneapolis (GMT+5), the same event shows two different starting times depending on the user's geographical location. The kendoScheduler seems to convert the dates to local time and this is great for me. (The documentation indicates it should do the opposite, but this is the effect I wanted so for now I'm happy).

The problem is that it computes local time wrong. In Minneapolis, it takes GMT and adds 5 and in San Francisco, it takes GMT and adds 7. It should be subtracting these values, not adding them! If it's 00:00 GMT, it's 17:00 the previous day in San Francisco, not 07:00.

Has anyone else had the same sort of issues? Searching the forums, it seems like I'm not the only one encountering this.



Matt Johnson
Top achievements
Rank 1
 answered on 10 Oct 2013
6 answers
265 views
var dataSource = new kendo.data.DataSource({
        transport: {
          read: {
            url: "http://localhost/apartment/data.php?api=profile",
            dataType: "json",
            type: "GET"
          }
        }

    });

    var viewModel = kendo.observable({
      datasource: dataSource
    });

   var listView = new kendo.View("profile-template", {
    model: viewModel
   });

    var listHtml = listView.render();
    $("#profile-view table").html(listHtml);

  My TEMPLATE: 
  
   <script id="profile-template" type="text/x-kendo-template">
   <tr>
     <td>Name</td><td> <span>#= datasource.name #</span></td>
   </tr>
   <tr>
     <td>Email</td><td>#= name #</td>
   </tr>
   <tr>
     <td>Mobile Number</td><td>9629014027</td>
   </tr>
   <tr>
     <td>Apartment</td><td>Green Age</td>
   </tr>
 </script>

Parag
Top achievements
Rank 1
 answered on 10 Oct 2013
2 answers
583 views
I was wondering if there is a way to manipulate the dropdownlist popup in order to make it behave like a modal that is centered on the screen?  I really like how on the Android Chrome browser, an HTML select element pops up a modal that takes up the whole screen and allows the user to make a choice when it is activated.  Is there any way I can duplicate this kind of functionality on a kendo dropdownlist?
Mike
Top achievements
Rank 1
 answered on 09 Oct 2013
20 answers
276 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
99 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
84 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
491 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
1.8K+ 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
410 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
90 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?