Telerik Forums
Kendo UI for jQuery Forum
2 answers
165 views
Hello, 

we have a line chart similar to the Multi-axis line chart example in your demos (columns and a line) with two valueAxis. Everything works fine, but our data is too large and the multi-axis line chart consists of hundreds of columns.
The first of the two value axes should be placed at the beginning of the chart and the second at the end of it, and the problem comes here.When there are hundreds of columns in the chart, and the user scrolls the chart, the ValueAxis are scrolling too, and he/she should scroll to the end of the chart to see the valueAxis.Is there a way to scroll only the categoryAxis, but the two value axes to be static on the page?
Alex
Top achievements
Rank 1
 answered on 27 Sep 2012
0 answers
162 views
Hello.

I want to know is there any way to  change the info message: "Drag a column header and drop it here to group by that column " with a custom one, with a configuration setting of the grid or something like that, without any side effect? I tried to change it with 
setTimeout(function () {
                    $(".k-grouping-header").Html("Custom Info Message");
                });  and it works fine, until someone drag a column. The titles of the dragged columns are not displayed in the bar where the info message appears, so they cannot be removed from the grouping.

Thank you.
Alex
Top achievements
Rank 1
 asked on 27 Sep 2012
1 answer
271 views
Hi All,

I am binding Xml data to a grid. Following is the script I used to create the grid. In that script there is a one field TimeCreated which the type is in date format  and the actual result of that field looks like
"2012-09-21T21:59:26.6929846+05:30 " how can i format this to get the time part seperate and
date in "yyyy/MM/dd"(please note that i am using xml)





<script type="text/javascript">
            $(document).ready(function () {
                $("#grid").kendoGrid({
                    dataSource: new kendo.data.DataSource({


                        
                        transport: {
                           
                            read: "HandlerErrorLog.ashx"
                        },
                        pageSize: 8,
                        
                        schema: {
                         
                            type: "xml",
                           
                            data: "Errors/E2ETraceEvent",
                          
                            model: {
                              
                                fields: {
                                  
                                    TimeCreated: "System/TimeCreated/@SystemTime",


                                    ApplicationData: "ApplicationData/text()"
                                    
                                    
                                }
                            }
                        }
                    }),
                    scrollable: false,
                    sortable: true,
                    filterable: true,
                    selectable: "multiple row",
                    pageable:true
                    
                  
                });
               
            });
            </script>
Petur Subev
Telerik team
 answered on 27 Sep 2012
5 answers
764 views
is it possible to use the editor functionality to allow edit of a field in a custom grid popup,  the popup is displaying extra fields in my record.  It was possible in MVC telerik ext. 

regards

chris
Vladimir Iliev
Telerik team
 answered on 27 Sep 2012
1 answer
242 views
Hi,

I have a problem with data source for autocomplete. I get data from remote service via callback function which fills global json object. I need to use this object as a datasource but I don't know how to refresh datasource because I don't have transport.read method. Is there a way how to refresh datasource somehow?

This code could help to clafiry:

YAHOOsuggest={ResultSet:{Query:'',Result:[]}};<br>
YAHOO = { Finance: { SymbolSuggest: { ssCallback: function (jsn) { YAHOOsuggest = jsn; return (jsn); } } } };
 
function InitializeStockInput() {
    $("#stockInput").kendoAutoComplete({<br>
        dataSource: new kendo.data.DataSource({
            data: YAHOOsuggest.ResultSet.Result,
            type: "json"
        }),
        placeholder: "Select stock...",
        minLength: 1,
        dataTextField: "name",
        dataValueField: "symbol"
    });
}
 
function StockInputChanged(sender) {
    var url='http://d.yimg.com/autoc.finance.yahoo.com/autoc?query='+ sender.value +'&callback=YAHOO.Finance.SymbolSuggest.ssCallback';
    helper(url);
}
 
 
function helper(url) {
    var head = document.getElementsByTagName('head')[0];
    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = url;
    script.id = 'helperScript';
    script.onload = cleaner;
    head.appendChild(script);
}
 
 
function cleaner() {
    $('#helperScript').remove();
}
Daniel
Telerik team
 answered on 27 Sep 2012
0 answers
53 views
Hi,

in this example http://demos.kendoui.com/mobile/forms/index.html the select element seems not to work correct in chrome. If i choose  fast one element after the next it freeze sometimes. The choosen element is the last one. It only change then if i click to an other field or element. In firefox it works correct.

Looks like a bug ...
Georg
Top achievements
Rank 1
 asked on 27 Sep 2012
0 answers
192 views
Hi,
I'm trying to recreate the grid on this page every 30 seconds or so. What i do empty the div "grid-users" and do a call to the server. It returns me a JSON with the reconstructed table (but with updated rows), so I put it back inside the div.

The table shows find, but in the same setInterval block, once the table is back in the div, I try to make the grid and its controls on Kendo.

{% extends "saloons/templates/base.html" %}
{% from "ui/forms/macro.html" import wtform %}
{% block content %}
        <form id="form1" method="POST" action="">
      <br/><br/>
      <div id="total" align="right">Total de pedidos en soles: S/.<div id="num" style="display:inline"></div></div>
      <div id="fecha" align="left">Fecha: <input type="text" id="search_date" name="search_date" />
      <button  id="filter" name="filter" type="submit">Filtrar</button>
      </div>
      <br/><br/><br/><br/>
          <div id="grid-users"  class="grid-content" style="text-align: center; width: 100%!important">
            <table id="grid">
                <thead>
                    <tr>
                        <th data-field="number" style="text-align: center">Nro.</th>
                        <th data-field="item" style="text-align: center">Articulo</th>
                        <th data-field="requester" style="text-align: center">Solicitante</th>
                        <th data-field="client" style="text-align: center">Cliente</th>
                        <th data-field="price" style="text-align: center">Precio</th>
            <th data-field="date" style="text-align: center">Fecha del Pedido</th>
                        <th data-field="status" style="text-align: center">Estado</th>
                        <th data-field="save" style="text-align: center">Guardar Estado</th>
                    </tr>
                </thead>
                <tbody id="pedidos">
                    {% for i in orders %}
                    <tr id="{{ i.id }}">
                    <td>{{loop.index}}</td>
                    <td>{{ i.ItemName }}</td>
                    <td>{{i.user()}}</td>
                    <td>{{i.tab.user}}</td>
                    {% if i.isInventory %}
                        <td>S/. {{ i.ItemPrice }}</td>
                    {% else %}
                        <td><input type="text" id="price{{ i.id }}" value="{{ i.ItemPrice }}"/></td>
                    {% endif %}
            <td>{{ i.dateOrder }}</td>
                    <td>
                        <select id="cmb{{ i.id }}">
                            <option value="PENDIENTE" selected="true">PENDIENTE</option>
                            <option value="ATENDIDO">ATENDIDO</option>
                            <option value="DENEGADO">DENEGADO</option>
                        </select>
                    </td>
                    <td><a href="#" id="{{ i.id }}" rel="save">Grabar</a></td>
                    </tr>
                    {% endfor %}  
                </tbody>
              
            </table>
          </div>
        </form>
        <script>           
            $(function() {               
               $("a[rel=save]").live('click', function() {
                    var id = $(this).attr('id');
                     
                    var p = $(this).parent().parent().find("td:eq(4)").html();
                    var p2 = p.substring(4, p.length);
                    var p3 = parseFloat(p2);
                     
                    if (isNaN(p3) == true)
                    {
                        p3 = $("#price"+id).val();
                    }
                    var a = $("#cmb"+id).val();
            if (a == 'PENDIENTE')
            {
              alert('Debe cambiar el estado del pedido');
            }
            else
            {
              var res = confirm("Está seguro de este cambio de estado?");
              if (res){
              $.post("check_order",{status : a, cod : id, price : p3, flag : true}, function(data) {
                var d = JSON.parse(data);
                if (!d.cancel){
                $("#cmb"+id).parent().parent().parent().remove();
                $("#pedidos tr").each(function(i, v){                           
                    if (i+1 > 0) {
                    $(this).find("td:first").html(i+1);
                    }
                   });
                $("#num").text(d.total);
                }
                else{
                  alert("El pedido que trata de actualizar ha sido cancelado. Refrescando pagina...");
                  parent.location.href = parent.location.href;
                }
              });
              }
            }
                    return false;
               });
               
 
          $("#fecha").attr('class', 'k-header');
          $("#fecha").css({'width' : '290px',
                  'float' : 'left'});
           
          var f = new Date("{{ f }}");
           
          $("#search_date").kendoDatePicker({
             value: new Date(f),
                     format: "dd/MM/yyyy",
                     name: "search_date"
        });
           
          $("#search_date").attr('readonly', 'readonly');
              $("#grid").kendoGrid({
          height: 460,
          sortable: false,
          columns: [{field:"number", width:40},
                {field:"item", width:80},
                            {field:"requester", width:80},
                            {field:"client", width:80},
                            {field:"price", width:100},
                {field:"date", width:100},
                {field:"status", width:120},
                            {field:"save", width:80}]
 
          });
               
              var arr = [];
              $('a[rel=save]').each(function(){
                   arr.push($(this).attr('id'));
               });
               
              for(i =0; i<arr.length;i++)
              {
                 $("#pedidos tr")
                    .find("td:eq(4)")
                    .children("#price" + arr[i])
                    .kendoNumericTextBox({
                        min:0,
                        max:150,
                        decimals:2,
                        upArrowText:"Aumentar",
                        downArrowText:"Disminuir",
                        format: "c"
                    });
              }
              
         $("#total").css({'border-style' : 'solid',
                 'border-width': '3px',
                 'padding' : '10px',
                 'width' : '300px',
                 'float' : 'right',
                 'font-size' : '16px',
                 'font-weight' : 'bold'});
         $("#num").text("{{ total_orders }}");
         $("#total").attr('class', 'k-header');
              //FIXME: El combo en KendoUI debe integrar las opciones originales del combo
              $("#pedidos tr").each(function(i,v) {
                   $(this).find("td:eq(6)").children("select").kendoDropDownList();
                });
           
          setInterval(function(){
        $("#grid-users").empty();
        $.getJSON("/cafe/uco", function(json){
            $("#grid-users").html(json.ord);
          });
           
          console.log($("#grid"));
              $("#grid").kendoGrid({
          height: 460,
          sortable: false,
          columns: [{field:"number", width:40},
                {field:"item", width:80},
                            {field:"requester", width:80},
                            {field:"client", width:80},
                            {field:"price", width:100},
                {field:"date", width:100},
                {field:"status", width:120},
                            {field:"save", width:80}]
 
          });
           
              var arr2 = [];
              $('a[rel=save]').each(function(){
                   arr2.push($(this).attr('id'));
               });
               
              for(i =0; i<arr2.length;i++)
              {
                 $("#pedidos tr")
                    .find("td:eq(4)")
                    .children("#price" + arr[i])
                    .kendoNumericTextBox({
                        min:0,
                        max:150,
                        decimals:2,
                        upArrowText:"Aumentar",
                        downArrowText:"Disminuir",
                        format: "c"
                    });
              }
           
              $("#pedidos tr").each(function(i,v) {
                   $(this).find("td:eq(6)").children("select").kendoDropDownList();
              });
           
          },10000);
            });
        </script>
{% endblock %}

For some reason, the grid and the controls don't get to Kendo once the table is reconstructed. Can someone tell me why? Am I doing something wrong? =S
Christian
Top achievements
Rank 1
 asked on 27 Sep 2012
1 answer
923 views


Majid
Top achievements
Rank 1
 answered on 26 Sep 2012
1 answer
734 views
Hi,

We are trying to bind the JSON data to grid using "Read" transport datasource. but somehow the grid does not show any record. The JSON data is valid and returned by ASP.NET Web API. If the JSON data is copied to ".JSON" file and provided to datasource, it works.

One of the strange part noticed, when the result is binding internally (guess), the grid throws an error. The error is "ParserError". Below is the code snippet. Please let me know any work around.

If the dataSource type is changed to "JSON", the error message is "No Transport".

<!DOCTYPE html>
<head>
    <title>Test Page</title>
    <script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="Scripts/kendo.all.min.js" type="text/javascript"></script>
    <link href="styles/kendo.common.min.css" rel="stylesheet" />
    <link href="styles/kendo.default.min.css" rel="stylesheet" />
    <script src="js/json2.js"></script>
</head>
<body>
    <div id="example" class="k-content">
            <div id="grid"></div>
            <input id="btnView" type="button" value="view" onclick="JavaScript: rebind();" />
            <script>
                function rebind() {
                    var gridDS = $("#grid").data("kendoGrid").dataSource;
                    gridDS.read();
                }
 
                $(document).ready(function () {
                    $("#grid").kendoGrid({
                        dataSource: {
                            type: "odata",
                            transport: {
                                read:"http://XYZ/JSON/Data",
                                    contentType: "application/json; charset=utf-8",
                                    type: "GET", 
                                    dataType: "json"
                            },
                            success: function (e) {
                                alert("Error: " + e.error);
                            },
                            schema: {
                                data: "Result"
                            },
                            error: function (e) {
                                debugger;
                                alert("Error: " + e.errorThrown);
                            },
                            change: function (e) {
                                alert("Change");
                            },
                            requestStart: function (e) {
                                //alert("Request Start");
                            },
                            pageSize: 10,
                            serverPaging: true,
                            serverFiltering: true,
                            serverSorting: true
                        },
                        height: 250,
                        filterable: true,
                        sortable: true,
                        pageable: true
                    });
                });
            </script>
        </div>
</body>
</html>



Regards,
Maulik
Gerald
Top achievements
Rank 2
 answered on 26 Sep 2012
1 answer
2.0K+ views
I cannot seem to find the CSS for the background color of the selected item in the Kendo ComboBox. Could anyone suggest how I could customize it? I'm attempting to change the Metro pallet and this is the only item that still shows green. Thanks!
Robert Kaucher
Top achievements
Rank 2
 answered on 26 Sep 2012
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?