Telerik Forums
Kendo UI for jQuery Forum
1 answer
137 views
Hello,

For test purposes, I'm trying to resize a line chart that is embedded in a RadPane as soon as the size of the browser window changes. This is done by calling kendo.resize. The following code defines my sample web form:

<%@ Page Language="VB" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="RadControlsWebApp1._Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server" style="width: 100%; height: 100%;">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
 
    <style type="text/css">html { height: 95%; overflow: visible; }</style>
 
    <link href="styles/kendo.common.min.css" rel="stylesheet" />
    <link href="styles/kendo.default.min.css" rel="stylesheet" />
    <link href="styles/kendo.dataviz.min.css" rel="stylesheet" />
    <link href="styles/kendo.dataviz.default.min.css" rel="stylesheet" /> 
</head>
<body style="height: 100%;">
    <form id="form1" runat="server" style="height: 100%;">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
 
            <asp:ScriptReference Path="~/js/jquery.min.js" />
            <asp:ScriptReference Path="~/js/kendo.all.min.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        function createChart() {
            $("#chart").kendoChart({
                title: {
                    text: "A Report"
                },
                legend: {
                    position: "bottom"
                },
 
                series: [{
                    type: "area",
                    data: [2, -1, 3],
                    name: "Signal 1",
                    color: "#ff1c1c",
                    axis: "ax_1"
                }, {
                    type: "area",
                    data: [3, 5, 30],
                    name: "Signal 2",
                    color: "#ffae00",
                    axis: "ax_2"
                }],
 
                valueAxes: [{
                    name: "ax_2",
                    min: 0,
                    max: 40,
                    axisCrossingValue: 0
                }, {
                    name: "ax_1",
                    min: -2,
                    max: 5
                }],
 
                categoryAxis: {
                    categories: ["2013", "2014", "2015"],
                    axisCrossingValues: [4, 0],
                    justified: true
                },
 
                tooltip: {
                    visible: true,
                    format: "{0}",
                    template: "#= category #/03: #= value #"
                }
            });
        }
 
        $(document).ready(createChart);
        $(document).bind("kendo:skinChange", createChart);
        $(window).on("resize", function () {
            kendo.resize($("#chart"));
        });
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
         
    <telerik:RadSplitter ID="rsProTrendFrame" Runat="server" Width="100%" Height="100%">
        <telerik:RadPane ID="rpApplication" Runat="server" Width="100%" Height="100%">
            <div id="example" class="k-content" style="width: 100%; height: 100%;">
                <div class="chart-wrapper" style="width: 100%; height: 100%;">
                    <div id="chart" style="width: 100%; height: 100%;">
                    </div>
                </div>
            </div>
        </telerik:RadPane>
    </telerik:RadSplitter>
    </form>
</body>
</html>

Unfortunately, the line chart is not being resized correctly. How can I avoid this problem?
Vessy
Telerik team
 answered on 24 Apr 2014
1 answer
216 views
Hi,

I am working on a dataGrid, which needs to be editable, and able to export CSV file.


so the columns  this:

columns: [{command: ["edit"], title: " ", width: "100px"},
{field:"channelId", title: dict.channel,template:'#: channelList[(channelId-1)]#'},
{field:"campaignId", title:dict.campaign,editor: disabledEditor},
{field:"status", title:dict.status,template:'<span style="text-transform:lowercase">#: status#</span>'},
{field:"budget", title:dict.budget+' (USD)', type: "number",format: "{0:c2}"},

{field:"impressior", title:dict.impressior,type: "number"},
{field: "clcik", title:dict.click,type: "number"},
{field: "dailyBudget", title:dict.cost,type: "number",format: "{0:c}"},
{field: "conv", title:dict.conv,type: "number"},
{field: "avgPost", title:dict.avgPost,type: "number"},
{field: "ctr", title:dict.ctr,type: "number"},
{field: "cpc", title:dict.cpc,type: "number"},
{field: "cpa", title:dict.cpa,type: "number"}
],

I am using this method to export csv:
http://blog.falafel.com/Blogs/RachelHagerman/rachel-hagerman/2014/02/04/super-simple-spreadsheet-export-from-kendo-ui-grid

however, as I used 'template' in 'columns', the export CSV function crashed here:


if (value && template && exportFormat !== false) {
value = _.isFunction(template)
? template(data[row])
: kendo.template(template)(data[row]);
}

if I takes out 'template' from 'columns' and use 'rowTemplate' like this:
rowTemplate: '<tr data-uid="#= uid #"><td></td><td>#= channelList[(channelId-1)]#</td><td>#: campaignId#</td><td style="text-transform:lowercase">#: status#</td><td>#: budget#</td><td>#: impressior#</td><td>#: clcik#</td><td>#: dailyBudget#</td><td>#: conv#</td><td>#: avgPost#</td><td>#: ctr#</td><td>#: cpc#</td><td>#: cpa#</td></tr>',

 the CSV export script works, but the edit button do not appear

I tried to put '<a class="k-button k-button-icontext k-grid-edit" href="#"><span class="k-icon k-edit"></span>Edit</a>' in the row template like this example
but still not working



Another problem is, the value of one of the field is number, but what needs to be display are string, refer to an Array, like this:

 '#: channelList[(channelId-1)]#'

It only returns the number on the CSV


please help and  thanks






 
Vladimir Iliev
Telerik team
 answered on 24 Apr 2014
2 answers
120 views
Thanks for your response. And if so, can you please let me know how it should be done? 

Regards,

UK
Sebastian
Telerik team
 answered on 24 Apr 2014
1 answer
773 views
Please tell me how can we remove element from multi listview. When i am selecting any item it is giving me value but i am unable to remove selected elements.

PSB code:

var data = [
    { id: 1, text: "text 1" },
    { id: 2, text: "text 2" },
    { id: 3, text: "text 3" }
];


var d = $("#listview").kendoListView({
    dataSource: data,
    template: kendo.template($("#template").html()),
    selectable: "multiple",
    change: function() {
        var index = this.select().index(),
            dataItem = this.dataSource.view()[index];
  
        //log("id: " + dataItem.id + ", text: " + dataItem.text);
        var selected = $.map(this.select(), function(item) {
            return data[$(item).index()].id;
               });
        //data.remove(selected);
        //console.log(data);
        console.log(selected);
        //console.log("[" + selected.join(", ") + "]");
    }
});


Please see jsfiddle : http://jsfiddle.net/AAMLA/179/
Alexander Popov
Telerik team
 answered on 24 Apr 2014
7 answers
861 views
Hi, 
I just want to know if there is a way to prevent scheduled event overlap on Kendo scheduler?.. e.g. If a user has an event on 7:00 am to 10am,  adding new event that conflict on that time will prevent adding this new event schedule in the scheduler. . Is it possible?
By the way I'm using the trial version 2013.2.716.. Is it supported on the trial version? if not, how about on the licensed one, does this kind of functionality supported?

Thanks.

Regards,
Jesson
Rosen
Telerik team
 answered on 24 Apr 2014
8 answers
216 views
Hi, I have just downloaded the newest Kendo UI release 2014.1.416, which fixed a problem preventing me from testing my SPA app in IE8. So, I shall start out in saying I am not sure if this issue occurred in prior Kendo UI releases or if it is new. However I encountered another issue shortly after:

The following internal Kendo UI function throws an error stating "aggr is undefined", only in IE8. Newer IE versions work perfectly. I was forced to add the "if (aggr) { ... } " check within the for loop in the excerpt shown, but after that the function appears to work fine in IE8 and all others.

Obviously, I don't want to maintain this patch of mine throughout future versions of Kendo UI. Can this either be committed to Kendo UI source, or can I get help in diagnosing the actual cause of this?

function calculateAggregate(accumulator, aggregates, item, index, length, state) {
        aggregates = aggregates || [];
        var idx,
            aggr,
            functionName,
            len = aggregates.length;
 
        for (idx = 0; idx < len; idx++) {
            aggr = aggregates[idx];
            if (aggr) {
                functionName = aggr.aggregate;
                var field = aggr.field;
                accumulator[field] = accumulator[field] || {};
                state[field] = state[field] || {};
                state[field][functionName] = state[field][functionName] || {};
                accumulator[field][functionName] = functions[functionName.toLowerCase()](accumulator[field][functionName], item, kendo.accessor(field), index, length, state[field][functionName]);
            }
           }
    }
Rosen
Telerik team
 answered on 24 Apr 2014
4 answers
883 views
Hi There,

I have created the Grid using dropdown list as a filter. I added the dropdown while creating the Columns.

for example:

columns: [
{
title: "Name",
encoded: false,
width: 160,
ui: jQuery.proxy(colFilter, { field: "Name", dataS: dataSource })  // dataSource is having all the values related to Name Column.

},
{
field: "City",
encoded: false,
width: 130,
filterable: {
ui: jQuery.proxy(colFilter, { field: "City", dataS: dataSource })  // dataSource is having all the values related to City Column.
}
}]


function colFilter(element) {
    try {        
        element.kendoDropDownList({
            dataSource: this.dataS,
            optionLabel: "--Select Value--"
        })
    } catch (exception) {
        alert(exception.Message);
    }
}

Suppose that I filter the Name column with any value. I want to show the related entries of the current view in City column filter dropdown. Instead of showing all the values.

How can this will be achieve?

Regards.
Adam
Top achievements
Rank 1
 answered on 23 Apr 2014
2 answers
256 views
How do I grab all shapes that are connected?  I see methods to check if two shapes are connected...but nothing to show which objects are connected...Perhaps as an array of JSON  like this?

[
  {shape1: { name: "something1", path: "/index" }, connector: { name: "connectortype1" }, shape2: { name: "something2", path: "/index2" } },
  {shape1: { name: "something3", path: "/index" }, connector: { name: "connectortype1" }, shape2: { name: "something4", path: "/index2" } }
]
Aaron
Top achievements
Rank 1
 answered on 23 Apr 2014
1 answer
735 views
I have the following values in my in my razor div tag:

 

 

<div class="countdownKendoGrid" data-bind="kendoGrid: { data: $parent.RandomList, rowTemplate: ​'rl-row-template',​columns: [{ field: 'COL1', title: 'COL1', width: '50%' }, { field: 'COL2', title: 'COL2', width: '50%' }], filter: [{ field: ​'COL1', operator: 'eq', value: 'AB1234' }]}​"></div>

My questions, since I'm rather new at this, are:
1). Why would just the row where COL1 equals to AB1234 not be the only one that appears?
2).  could I substitute "value: 'AB1234'" to be a property in my ViewModel?  ie: value: $parent.MyBindableValue

J

 

​​​​​​​​​​​​​​​

 

​​​​​​
Alexander Valchev
Telerik team
 answered on 23 Apr 2014
5 answers
542 views
Hi, 

I am using trail version, i just want to know is there any API in your framework which allows me to print Grid and charts? 


Thanks,
Amar
Dimo
Telerik team
 answered on 23 Apr 2014
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
Drag and Drop
Application
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
DropDownTree
ListBox
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
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?