Telerik Forums
Kendo UI for jQuery Forum
1 answer
165 views
are you considering adding a tagTemplate (like multiselect: https://docs.telerik.com/kendo-ui/api/javascript/ui/multiselect/configuration/tagtemplate) to DropDownTree?
Veselin Tsvetanov
Telerik team
 answered on 26 Feb 2019
8 answers
636 views

     I am using Treelist Multicolumn headers to apply multiple columns in treelist. I have been facing an issue when applying attributes & headerAttributes properties. I tried implementing it in the below link example, but it doesn't works. I found there is a bug reported in Github related to this issue, but not sure whether its fixed or available in the latest version. Is there any fixes ? Thanks.

https://dojo.telerik.com/@paulrajj/iJifOwas

Paulraj
Top achievements
Rank 1
 answered on 26 Feb 2019
1 answer
193 views

I am new to telerik kendo chart I have created a string that is being returned from an ashx page. I want the x Axis to be the date has in the month and year and for each date there will be two box going up to the number.

 

ASHX.CS Page

string JSON = sb.ToString(); context.Response.ContentType = "text/json"; context.Response.Write(JSON);

Returns

[{"Date":"2/2018""Images":"199956""ImagesDownloads":"540903"},{"Date":"3/2018""Images":"226606""ImagesDownloads":"635068"}]

 

JS Page

var DataSource = new kendo.data.DataSource({ transport: { read: { url: function() {return "/URI";}, dataType: "json"}},group: { field: "Date"}, sort: { field: "Date", dir: "asc"}, schema: { model: { fields: { date: { type: "date"}}}}});function createChart() { $("#chart1").kendoChart({ dataSource: DataSource, legend: { position: "bottom"}, series:[{ field: "Images", categoryField: "Date", name: "Number of Images"}, { field: "ImagesDownloads", categoryField: "Date", name: "Number of Images download"}], categoryAxis: { field: 'Date'}, tooltip: { visible: true, shared: true}});} $(document).ready(function () { $(document).ready(createChart); $(document).bind("kendo:skinChange", createChart);

Tsvetina
Telerik team
 answered on 25 Feb 2019
1 answer
146 views

We want to use Kendo vertical progressbar in one of our grig (basic usage) column (named "Zero"). All matherials were took from spring demos.

We have tried to use basic html progress-bar (template="<progress max='100' value='75' style='transform: rotate(-90deg); height: 40px; background-color: \#d40000'></progress></div>'"/>) and it's work correctly (but we already have some problems with style - we can't change progressbar color).

However, when we tried to use:

template="<kendo:grid name='grid' groupable='true' sortable='true' style='height:550px;'>"

it stop worked.

 

Hull code:

<kendo:grid name="grid" groupable="true" sortable="true" style="height:550px;">
<kendo:grid-pageable refresh="true" pageSizes="true" buttonCount="5">
</kendo:grid-pageable>

<kendo:grid-columns>

<kendo:grid-column title="Zero" field="zero" width="470" template="<kendo:grid name='grid' groupable='true' sortable='true' style='height:550px;'>"
/>

<kendo:grid-column title="Contact Name" field="contactName" width="240"
template="<div class='customer-photo' style='background-image: url(../resources/web/Customers/#:data.customerId#.jpg);'></div><div class='customer-name'>#: contactName #</div>">
</kendo:grid-column>
<kendo:grid-column title="Contact Title" field="contactTitle" />
<kendo:grid-column title="Company Name" field="companyName" />
<kendo:grid-column title="Country" field="country" width="150" />
</kendo:grid-columns>

Konstantin Dikov
Telerik team
 answered on 25 Feb 2019
4 answers
594 views

I am trying to stop the navigation on the Calendar to use it for displaying information.  Still need the ability to select a day.
 
I have tried setting navigate event with
 
e.preventDefault() and e.preventDefault() ; return false;
 
but neither of these seem these work any ideas
 
Thanks

Angel Petrov
Telerik team
 answered on 25 Feb 2019
2 answers
323 views

Hi,

I'm my app I've a window with an action (a save button) defined. I'm trying to hide or not this action depending in a ViewData value.  If I've write permissions I should see the button, else I shouldn't. How could achieve it? I could create 2 different windows or control it with jquery and hidding the button, but I think it's not the best way.

My window:

@(Html.Kendo().Window()
              .Name("windowZonaExclusivas")
              .Width(930)
              .Resizable()
              .Modal(true)
              .Visible(false)
              .Title("TEst")
              .Draggable(true)
              .Actions(actions => actions.Custom("Save").Maximize().Close())
              .LoadContentFrom("EditZona", "ZonasExclusivas", new { idZona = -1 })
)

Any help will be appreciated.

Thanks in advance.

Miguel
Top achievements
Rank 1
 answered on 25 Feb 2019
1 answer
3.0K+ views
I wrote some code to export a datasources.view() to a csv file for anyone interested.

    /**
     * Converts a datasource's view to CSV and saves it using data URI.
       * Uses underscore for collection manipulation http://underscorejs.org/ 
     * Uses moment.js for date parsing (you can change this if you would like)
     * TODO save it using Downloadify to save the file name https://github.com/dcneiner/Downloadify
     * @param {Array.<Object>} data The data to convert.
     * @param {boolean} humanize If true, it will humanize the column header names.
     * It will replace _ with a space and split CamelCase naming to have a space in between names -> Camel Case
     * @param {Array.<String>} ignore Columns to ignore.
     * @returns {string} The csv string.
     */
    var toCSV = function (data, fileName, humanize, ignore) {
        var csv = '';
        if (!ignore) {
            ignore = [];
        }
 
        //ignore added datasource properties
        ignore = _.union(ignore, ["_events", "idField", "_defaultId", "constructor", "init", "get",
            "_set", "wrap", "bind", "one", "first", "trigger",
            "unbind", "uid", "dirty", "id", "parent" ]);
 
        //add the header row
        if (data.length > 0) {
            for (var col in data[0]) {
                //do not include inherited properties
                if (!data[0].hasOwnProperty(col) || _.include(ignore, col)) {
                    continue;
                }
 
                if (humanize) {
                    col = col.split('_').join(' ').replace(/([A-Z])/g, ' $1');
                }
 
                col = col.replace(/"/g, '""');
                csv += '"' + col + '"';
                if (col != data[0].length - 1) {
                    csv += ",";
                }
            }
            csv += "\n";
        }
 
        //add each row of data
        for (var row in data) {
            for (var col in data[row]) {
                //do not include inherited properties
                if (!data[row].hasOwnProperty(col) || _.include(ignore, col)) {
                    continue;
                }
 
                var value = data[row][col];
                if (value === null) {
                    value = "";
                } else if (value instanceof Date) {
                    value = moment(value).format("MM/D/YYYY");
                } else {
                    value = value.toString();
                }
 
                value = value.replace(/"/g, '""');
                csv += '"' + value + '"';
                if (col != data[row].length - 1) {
                    csv += ",";
                }
            }
            csv += "\n";
        }
 
        //TODO replace with downloadify so we can get proper file naming
        window.open("data:text/csv;charset=utf-8," + escape(csv))
    };
 
//toCSV(dataSource.view(), "FileName not used yet", true, ['IdColumnToIgnore', 'AnotherColumnToIgnore']);
Trushar
Top achievements
Rank 1
Veteran
 answered on 22 Feb 2019
4 answers
6.7K+ views

Hello all,

I'd like to know how to pass a parameter to an event handler registered inside a template. In my case, how to pass EmployeeID to myFunc()?  I have tried onclick='myFunc(EmployeeID)'  and  onclick='myFunc(#: EmployeeID#)' and onclick='myFunc(#= EmployeeID #)'  , but none of them works.

<script type="text/x-kendo-template" id="emp_list_template">
    <div class="product">
        <img src="@Url.Content("~/content/shared/images/employees/")#: EmployeeID #.png" alt="#: EmployeeID #" />
        <a href='' onclick='myFunc(EmployeeID)'>Download</a>
    </div>
</script>

Thanks.

 

 

Daochuen
Top achievements
Rank 1
Iron
Veteran
Iron
 answered on 21 Feb 2019
1 answer
114 views

Good day!

We are using kendo to upload images, but on our server with NAXSI (web application firewall), its blocking the form post data if the filesize of the image is less than 10KB, if its 10 KB and above, it's allowing the upload.

Any ideas how to fix this?

Thanks!

Ollie dG.

 

 

Ollie
Top achievements
Rank 1
Iron
 answered on 20 Feb 2019
1 answer
225 views

I have been trying to upgrade Jquery to 3.3.1 for my project in RequireJS but it's giving error kendogrid is not a function.

So I used latest Kendo.all.min but still the issue is not resolved.

Please find attached sample code file link below

http://dojo.telerik.com/@roger.telegan/aXOHeTiK

Tsvetina
Telerik team
 answered on 20 Feb 2019
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?