Telerik Forums
Kendo UI for jQuery Forum
1 answer
610 views
I'm attempting to display major ticks every X base units and minor ticks at every base unit along the category axis of a line chart (category labels are setup to display at the major tick position too).

The problem I'm experiencing is that as the minor ticks are rendered across the category axis, they aren't lining up correctly with the major tick (a few pixels off depending on the chart width - larger chart width makes the alignment problem more noticeable).  This is only occurring when the categoryAxis.justified is set to true.  If it is set to false, the minor ticks line up perfectly between the major ticks.

I've set up a simple example here demonstrating the problem: jsFiddle

If that doesn't work, here is the snippet:
<div id="chart"></div>
<script>
$("#chart").kendoChart({
  seriesDefaults: {
    width: 1
  },
  series: [ {
    type: "line",
    line: {
      width: 1
    },
    markers: {
      visible: true,
      size: 3
    },
    data: [1, 2, 3, 2, 4, 6, 2, 5, 1, 4, 1, 3, 4, 4, 2, 5, 6, 4, 3, 4, 2, 2, 4, 5, 6, 2, 3, 0, 1]
  }],
  categoryAxis: {
    justified: true,
    majorGridLines: {
      visible: true,
      step: 8
    },
    minorGridLines: {
      visible: true,
      step: 2
    },
    majorTicks: {
      step: 8,
      color: "#ff0000",
      size: 10,
      width: 2
    },
    minorTicks: {
      visible: true,
      step: 2,
      color: "#ff00ff",
      size: 5
    }
  }
});
</script>
The major and minor grid lines are also setup to have the same step values as the ticks and display the same behavior of minor grid lines not falling perfectly between major grid lines.

The minor ticks/grid lines seem to get more and more out of line with the major ticks/grid lines the further along the category axis they go.

The version of kendo I've been using in development is v2013.2.925 (the jFiddle version is v2013.2.918).

On another note, why do I need to specify a step value of double what I would like the base units to step for minor ticks/grid lines?  In the example I've posted you will notice that the minor ticks/grid lines are set to step every 2 base units, but they actually step every base unit when the chart is rendered.
Iliana Dyankova
Telerik team
 answered on 04 Oct 2013
2 answers
93 views
If I include both the kendo.web.js and kendo.dataviz.js I get some bizarre errors happening.
See jsbin http://jsbin.com/uRATaJe/3/edit

This page just has an MVVM bound dropdownlist, and it keeps throwing an error.  While Chrome will go ahead and render the page correctly (edit: actually Chrome seems to crap out completely as well), Internet Explorer completely craps out.  If I remove the dataviz reference, the error goes away and all is well.
Robin
Top achievements
Rank 1
 answered on 04 Oct 2013
3 answers
127 views
Hi,

I have a requirement of having collapsible panel in the header part of kendo grid.
It should be able to expand and collapse as well. I need this to be implemented using HTML Extension helper class.
Please provide the sample. Looking forward.

Sample code:
public static GridBuilder<T> CreateToolbarBuilder<T>(this GridBuilder<T> builder) where T : class
        {
            //add options
            return builder
                    .ToolBar(toolBar => toolBar.Template(@"@(Html.Kendo().PanelBar()
                                                                .Name('panelbar')
                                                                .ExpandMode(PanelBarExpandMode.Multiple)
                                                                .Items(panelbar =>
                                                                {
                                                                    panelbar.Add().Text('Quick Find')
                                                                   .Expanded(true)
                                                                   .Content(@<div class='toolbar'>
                                                                            <label class='category-label' for='category'>Quick Find:</label>
                                                                            <input type='search' id='category' style='width: 300px'/>
                                                                        </div>);
                                                                })
                                                            )"));
        }

Thank you.
Alexander Popov
Telerik team
 answered on 04 Oct 2013
3 answers
507 views
Hi,
  I have a Kendo grid that when loaded has most of its columns hidden.
c.Bound(p => p.ServiceCost).Hidden(true).Width(100).Format("{0:$0.00}");
              c.Bound(p => p.AddressLine1).Title("Address").Width(90);
              c.Bound(p => p.City).Width(90);
              c.Bound(p => p.State).Title("State").Width(75);
              c.Bound(p => p.Zip).Width(75);
              c.Bound(p => p.ContactName).Hidden(true).Title("Contact<br/>Name").Width(100);
              c.Bound(p => p.PhoneNumber).Hidden(true).Title("Site<br/>Phone").Width(120);
              c.Bound(p => p.PhoneExtension).Hidden(true).Title("Site<br/>Ext").Width(90);
              c.Bound(p => p.Fax).Hidden(true).Title("Site<br/>Fax").Width(100);
              c.Bound(p => p.Email).Hidden(true).Title("Site<br/>Email").Width(150);
              c.Bound(p => p.Website).Hidden(true).Title("Website").Width(200);
..etc

Then i have checkboxes with the an ID that matches the model name
....
<label class="clean"><input type="checkbox" id="ContactName" class="basicChk"/>Contact Name</label></td><td>
<label class="clean"><input type="checkbox" id="PhoneNumber" class="basicChk"/>Site Phone</label></td><td>
<label class="clean"><input type="checkbox" id="PhoneExtension" class="basicChk"/>Site Phone Ext.</label></td><td>
...etc
and some JS to tie them together
$(".basicChk").bind('click', function () {
    var grid = $('#Providers').data("kendoGrid");
    if (this.checked) {
        grid.showColumn(this.id);
    }
    else {
        grid.hideColumn(this.id);
    }
});

Using Kendo UI Web v2013.2.716 All columns after the initally visible ones do not let me resize them. I've seen a past forum sayings its been fixed but its from last year
http://www.kendoui.com/forums/kendo-ui-complete-for-asp-net-mvc/grid/ie-8-bug-column-resize-handle-not-showing-on-dynamic-grid-columns.aspx

Any help or insight is greatly apprecited
Dimo
Telerik team
 answered on 04 Oct 2013
2 answers
1.8K+ views
Hi all,
I have a popup window which loads the content from another source.
var kendoOrderWindow = $("<div id='orderWindow' ></div>").kendoWindow({
 title: "Order "+orderIndex,
 resizable: false,
 modal: true,
 width: 1000,
 draggable: false,
 content: "myURLcontent",
 open: function (e) {
  this.wrapper.css({ top: 50 });
  }
});
kendoOrderWindow.data("kendoWindow")
 .center()
 .open()
The loaded content has a button, which should close the window
$("#button_close").click(function(e) {
    e.preventDefault();
    $('#orderWindow').data("kendoWindow").close();
});
What I find is that the close button works once, but if another orderWindow is opened after, the closebutton click event no longer fires.
If I reload the calling page the event will work again (but only once)

I have searched the forums and tried using
  $(this).closest(".k-window-content").data("kendoWindow").close();
and changing the click event to an onClick javascript function.
But none of these things seem to help.

Any ideas, suggestions to what I'm missing or doing wrong?




Glyn
Top achievements
Rank 1
 answered on 04 Oct 2013
0 answers
174 views
Hi,
I recently implemented serverPaging on my grid, however I noticed that when I sort it only sorts the data on that page and not the data as a whole.  I have added serverSorting: true, but this now stops any kind of sorting.  Can anyone assist on how to get this working or point me in the direction on some examples in PHP?   That would be much appreciated.

    $(document).ready(function() {

        $("#grid").kendoGrid({
            dataSource: {
                transport: {
                    read: {
                        dataType: "json",
                        url: "<?php echo BASE_PATH; ?>admin/account_data"
                    }
                },
                schema: {
                    total: "total",
                    data: "result",
                    model: {
                        fields: {
                            id: {type: "number"},
                            name: {type: "string"},
                            company: {type: "string"},
                            email: {type: "email"}
                        }
                    }
                },
                serverPaging: true,
                serverFiltering: true,
                serverSorting: true,
                pageSize: 25
            },
            scrollable: false,
            sortable: true,
            filterable: true,
            selectable: "row",
            detailTemplate: kendo.template($("#detailTemplate").html()),
            detailInit: detailInit,
            pageable: {refresh: true, },
            columns: [
                {field: "id", title: "ID", filterable: false},
                {field: "name", title: "Name"},
                {field: "company", title: "Company"},
                {field: "email", title: "Email"}
            ],
            editable: "inline"
        });

 // The PHP code getting the data


    function account_data() {

        //get current page from URL
        $get = $_SERVER['REQUEST_URI'];

        parse_str($get);
        if (isset($page)) {
            if ($page == 1) {
                $start = 1;
            } else {
                $start = $skip + 1;
            }
            $limit = $page * $pageSize;
        } else {
            $start = 0;
            $limit = 50;
        }

        $data= $admin->getData($start, $limit);
        $countData = $admin->countData($start, $limit);

        $data_arr['result'] = $data;
        $data_arr['total'] = $countData ;
       
$this->set('accounts_data', $data_arr);
    }

Martin
Top achievements
Rank 1
 asked on 04 Oct 2013
1 answer
88 views
Hi,
Please take a look at the attached sample.
I'm creating a grid with a row template. As long as i havnt changed any data the blur event of each input is invoked properly.
However , after changing a value and leaving the input , the grid is re-binded and it looks like all the inputs are being recreated !!! (blur event no longer works...).
Why does the grid re-creates the entire inputs and not updates the specific input that was modified.
Currently ,when having a bigger grid this actually causes a real performance issue , as every value hang causes the grid to -rebind and the browser hangs for a second (which is very annoying to users...)
Can you please help ?
Is there a way to tell the grid to  not to be fully refreshed ?
Does it require to create a grid without using the kendo..bind command ?
If so how can I insert data-role items to the grid (if I add data-role items to the example http://demos.kendoui.com/web/grid/rowtemplate.html it doest really work...)
thx for the help
Sagi 
Petur Subev
Telerik team
 answered on 04 Oct 2013
1 answer
107 views
Hello Everyone,

I am writing an web application with Kendo mobile. It seems iOS 7 safari button bar will cover last item in a long liveView. See attachment please.
I am seeking a  way to either hide button bar of iOS 7 safari or resize the page itself. Anyone has suggestions?

Thanks in advance!

-Marco
Kamen Bundev
Telerik team
 answered on 04 Oct 2013
1 answer
157 views
Hi - I have a Data Source defined for some fields on our webpage.  The first time in, it reads the data just fine.  Our users can select another value from a filter on the page, and when they click the an apply button, it should refresh the data, but it doesn't seem to do the read.  I'm not getting any errors, it just isn't doing the second read.

Any ideas?

kdsStudentInformation = new kendo.data.DataSource({
            transport: {  //transport: defines the URL endpoints for remote data (read/insert/update/delete)
                read: function (options) {
                    $.getJSON(Helpers.toServicesUrl("/GetctrlEWSStudentInfoPanel"),
                        {
                            studentId: studentIDParm,  //935824
                            username: WSIPCContext.UserName,
                            schoolCode: schoolCodeParm,
                            schoolYear: schoolYearParm,
                            districtId: WSIPCContext.DistrictId
 
                         },
                         function (data) {
                            stuInfox = data.GetctrlEWSStudentInfoPanelResult.RootResults;
                            kdsStudentInformation.data(stuInfox);
                            loadStudent();
 
                        }).fail(function (jqXHR) {
                            options.error(jqXHR);
                        });
                    //read               
                }, //transport
                schema: { //tells the Data Source where to find the result set
                    data: "stuInfox"
                }
           });

And to read it:

kdsStudentInformation.read();

thanks!
Lisa
Top achievements
Rank 1
 answered on 03 Oct 2013
1 answer
140 views
Hi Greg,

I would suggest to add "min" validation rule or define a custom one - for more information you can check this article.

Also about the template error - in current case I would suggest to add additional logic to the template where if the "vendorID" is null to return empty template. Additionally you can define "default" value for current field in the dataSource schema definition. 
Greg
Top achievements
Rank 1
 answered on 03 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
Drag and Drop
Map
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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?