Telerik Forums
Kendo UI for jQuery Forum
1 answer
139 views

I have copied the code from this example http://jsfiddle.net/yzKqV/159/ into a MVC view, the expand link is not working. the template for the master row is

<script id="rowTemplate" type="text/x-kendo-tmpl">
    <tr class="k-master-row">
        <td class="k-hierarchy-cell"><a href="\#" class="k-icon k-plus"></a></td>
        <td> ${FirstName} </td>
        <td> ${LastName} </td>
    </tr>
</script>

so the link for the href on my machine is https://localhost/# which is incorrect, not sure how to fix this link.

Any help would be greatly appreciated.

 

 

Konstantin Dikov
Telerik team
 answered on 16 Mar 2017
1 answer
133 views

hi 

i ma using k-rtl on spreadseet and the cells stay ltr. there is a wey to fix it?

Magdalena
Telerik team
 answered on 16 Mar 2017
1 answer
317 views

Hi,

 

I'm trying to get a diagram to generate a PDF file.

I've successfully persuaded it to output in landscape format using information from http://docs.telerik.com/kendo-ui/api/javascript/drawing/pdfoptionsbut I would also like to modify the output file's name and adjust other aspects of the output the code I'm, using is below:

function PrintDiagram() {
    var filename = jsonDiagram.Name.replace(/[^a-z0-9]/gi, '_').toLowerCase();
    findControl('input','EmpName').Value
    Telerik_Diagram.pdf = {
        creator: "Actis CRM",
        fileName: filename + '.pdf',
        subject: jsonDiagram.Name,
        title: jsonDiagram.Name,
        paperSize: "A4",
        landscape: true
    }
    Telerik_Diagram.saveAsPDF();
}

hopefully fairly self explanatory.

As I say the result is a diagram pdf that is correctly oriented but the file name is still the default 'export.pdf' and the pdf producer (I assume should map to 'creator) is still  Kendo UI PDF Generator v.2016.3.913. There is no title, author or subject either (see attached)

What am I doing wrong here?

 

Alan

 

Stefan
Telerik team
 answered on 16 Mar 2017
6 answers
297 views

hi:

my grid view data is using databound:

@model List<StockBetaVolatility>
@(Html.KendoGrid<StockBetaVolatility>()
            .Name("MainGridTable")
            .EnableCustomBinding(true)
            .Columns(columns =>
            {
                columns.Bound(p => p.TradeDate).Width(100);
                columns.ForeignKey(p => p.StockID, Shared.StockBaseNameList());
                columns.Bound(p => p.StockBeta);
                columns.Bound(p => p.StockVolatility);
            })
            .DataSource(dataSource => dataSource
                                    .Ajax()
                                    .Read(r => r.Action("AjaxRead", ViewContext.ControllerName())
                                                 .Data("PanelBarParameters"))
                                                 .ServerOperation(true)

            )
            .DefaultFormat()
            .Events(events => events.Change("GridMainSelect"))
)

 

in the browser is show B,

columns define:

 [DisplayName("stockβvalue")]
 public decimal StockBeta { get; set; }

how can i do?

 

Hubert
Top achievements
Rank 1
 answered on 16 Mar 2017
11 answers
1.0K+ views

I have a grid reading data from a SharePoint online list and one of the columns is a Choice type column that permits multiple values - maximum of 3 entries currently and unlikely to spread beyond 5. When getting the data using REST (getbytitle) the column comes back as a null if no item is selected or an object - collection of strings. I am using the template declaration within the grid column definition to use a function to extract the chosen items and concatenate them together into a comma separated list for display in the grid - see below:

{
    field: "BusinessDevelopmentProject",
    title: "Business Development Project",
    aggregates: ["count"],
    groupHeaderTemplate: "Project: #= GetBDProject(value)# - Count: #=count#",
    template: "<span>#= GetBDProject(BusinessDevelopmentProject) #</span>"
}

 

The function is as follows:

function GetBDProject(project) {
    if (project == null || project == undefined) return '';
    var projectString = '';
 
    for (var i = 0; i < project.results.length; i++) {
        projectString += project.results[i];
        if (i < (project.results.length - 1)) projectString += ', ';
    }
    return projectString;
};

 

This works perfectly for the column itself and when choosing to group by the column the grouping works OK and the grouping of those records with no project chosen is fine. But once I move to a page in the grid where the grouping changes to one with a value, so wants to group by it, the grid generates the following error and just sits with the loading graphic cycling permanently:

Uncaught SyntaxError: Unexpected identifier
    at Function (<anonymous>)
    at o.filter (kendo.all.min.js:11)
    at kendo.all.min.js:11
    at N (kendo.all.min.js:11)
    at o.select (kendo.all.min.js:11)
    at o.group (kendo.all.min.js:11)
    at Function.o.process (kendo.all.min.js:11)
    at init._queryProcess (kendo.all.min.js:11)
    at init.query (kendo.all.min.js:11)
    at init._query (kendo.all.min.js:11)

 

Is there something else I need to do to get the group header to work for a column with a function in for formatting?

 

Thanks in advance for any assistance.

PaulH
Top achievements
Rank 1
 answered on 15 Mar 2017
2 answers
227 views

I am using SPA with Kendo grid.  Can I apply different select color for different grid?  I tried to put the below style in my sub page.  But it will override my hosting page as well.  Thanks.

<style>
.k-grid .k-state-selected {
background-color: #cbf1e3 !important;
color: #000000;
}
.k-grid .k-alt.k-state-selected {
background-color: #cbf1e3 !important;
color: #000000;
}
</style>

Bertha
Top achievements
Rank 1
 answered on 15 Mar 2017
9 answers
827 views

I want to use the grid in a CSS flex layout with nested flex containers.  However the grid expands the flex item and the scrollbars are therefore missing (IE11 latest):

 

http://runner.telerik.io/fullscreen/iHugEV/16

What's going wrong here?

Scott Waye
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 15 Mar 2017
7 answers
2.4K+ views
I made a SPA, and I replace the #content after every menu element click.
First time when I load a grid it's work correctly. After when I click to the menu element I get this error message: Cannot call method 'value' of kendoDropDownList before it is initialized.
If I don't use pager it's work correctly.
Can somebody help me?

Here is the code:
var obuDS = new kendo.data.DataSource({
    transport: {
        read: {
            url: function(data) {
                return api_url_v1+"obus/user/"+$.cookie('user')+"?ssid="+$.cookie('ssid');
            },
            dataType: "json",
            complete: function(response,type) {
            }
        }
    },
    pageSize: 10
});
01.webcontrol.route("/obus", function() {
02.    $("#content").html(obus({}));
03.    $("#obus").kendoGrid({
04.        dataSource: obuDS,
05.        sortable: true,
06.        filterable: true,
07.        pageable: {
08.            refresh: true,
09.            pageSizes: true
10.        },
11.        columns: [
12.            { field: "name",        title: "Name",      width: 50, template: "<a href=\"\\#/obu/#:obu#/0\">#:name#</a>" },
13.            { field: "obu",         title: "OBU",   width: 70},
14.            { field: "country",     title: "Country",       width: 30 },
15.            { field: "eurocode",    title: "EURO",          width: 30 }
16.        ]
17.    });
18.});

Viktor Tachev
Telerik team
 answered on 15 Mar 2017
1 answer
141 views

I have a treeList inside a kendoUI window with a "Close" button, with two HierarchicalDataSource objects (one will load the remote data, one will load local data). 

I change between datasources with .setDataSource().

The first time I will open the window, I will load my data from the remote url source.
I use the dataBound event and $('#treeLIst').data("kendoTreeView").dataSource.data() to dump all the data items and store them in memory if a new item is appended.

Then I will close the window and on close the $('#window').data('kendoWindow').destroy() will run.

If I open the window again I will check if the memory variable has any data and will read from the local HierarchicalDataSource.
I used console.log to see the current HierarchicalDataSource and there are no url settings there so that means that the correct data source is read, but in my Chrome's network tab all the xhr requests from the HierarchicalDataSource being resent. also when I use the .append([dataObject], selectedNode) it will append the data object properly properly but multiplied the times I closed and reopened the kendo window. So if I close and open the window twice, 2 items will be appended and so on...

My guess is that the that the first HierarchicalDataSource is never really destroyed and each time I close and open the window it will be bound to my treeList even if the the treeList element has a totally different id.

Stefan
Telerik team
 answered on 15 Mar 2017
1 answer
225 views

Check the following scenario:

1. Go to the following http://dojo.telerik.com/uwUno

2. Click on "Chai" (first cell)

3. Enter <enter> in keyboard. The grid jumps up.

How can we disable this?

Alex Hajigeorgieva
Telerik team
 answered on 15 Mar 2017
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
ScrollView
Switch
TextArea
BulletChart
Licensing
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
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?