Telerik Forums
Kendo UI for jQuery Forum
1 answer
199 views
When I use colorField: "Color" with named colors such as "Red", "Green" or "Yellow" in the data for a column chart the following error is thrown:

0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'charAt'.

The color names work as expected in a donut chart.

I fixed this in the resolveColor function by adding the line

value = new String(value);

just after setting the default.  In my case the color was passed from JSON data.  The kendo.DataViz version is 2013.2.716.
T. Tsonev
Telerik team
 answered on 20 Aug 2013
1 answer
166 views
Hi there,

I have the following template defined in the page

<script id="templ" type="text/x-kendo-template">

    #var gridID = ceFeature.config.currentGrid#
#console.log(gridID)#

    # var columns = $("\\#" + gridID).data("kendoGrid").columns #
#console.log(columns)#

    <tr data-uid="#= uid #" role='row' style="outline: 1px solid rgba(0, 0, 0, 0.15);">
        #for(properties in columns) {#
       # if (properties != 'remove') {#
        #if (columns[properties].field == 'Id' || columns[properties].field == 'Hidetype') {#
        <td role="gridcell" style="display:none;">#=data[columns[properties].field] #</td>
        #}else {#
        #if (data[columns[properties].field] != undefined) {#

        #if (data[columns[properties].field].typeText == null) {#
        <td role="gridcell" data-types= "#= data[columns[properties].field].types #" data-begin="#= data[columns[properties].field].beginOffset #" data-end="#= data[columns[properties].field].endOffset #">#= data[columns[properties].field].val #</td>
        #} else {#

        <td role="gridcell" data-types= "#= data[columns[properties].field].types #" data-begin="#= data[columns[properties].field].beginOffset #" data-end="#= data[columns[properties].field].endOffset #">#= data[columns[properties].field].typeText #</td>
        #}#
        #}#

        #}#
        #}#
        #}#
    </tr>
</script>

but I keep getting the error

Template.compilekendo.web.js:272b.extend.proxy.b.isFunction.ijquery-1.9.1.min.js:3processTablejsbin.html:319processChildrenjsbin.html:85(anonymous function)jsbin.html:107b.extend.eachjquery-1.9.1.min.js:3b.fn.b.eachjquery-1.9.1.min.js:3processChildren


attaching file for reference



Rosen
Telerik team
 answered on 20 Aug 2013
1 answer
128 views
Is there any way to add a button to a grid group (when grouping).

I.e. if I am grouping by categories, on each "category" I could add a "delete" button, that would call code and act on all the records in that category.

Thanks, Erik.
Vladimir Iliev
Telerik team
 answered on 20 Aug 2013
3 answers
267 views
Hi!
I was wondering if there is a way to select a specific grid row when the grid is configured for virtual scrolling and the row is not currently loaded.
Can i bring to row into view and select it?
Currently i'm selecting the row's using this line of code:
$("#" + gridName).data("kendoGrid").select($("#" + gridName).data("kendoGrid").table.find('tr[data-id="' + rowDataId + '"]'));

This works perfectly if the row is already loaded and in view.

Nikolay Rusev
Telerik team
 answered on 20 Aug 2013
1 answer
447 views
I have a kendo tool tip that I am updating dynamically depending on a list of checkboxes. Here is the code for the tool tip:
@(Html.Kendo().Tooltip()
       .Callout(false)
       .For("#frontNumberSelected")
       .Position(TooltipPosition.Right)
       .Width(200)
       .ContentHandler("changeToolTip")
       .Events(e => { e.Show("refreshToolTip"); })
)
When the tool tip is shown it is immediately refreshed to update the content using the following function:
function changeToolTip() {
            var result = "";
 
            if ($(".dcheck").filter(":checked").length > 0) {
 
                var toolTipContent = new Array();
                $(":checkbox").filter(":checked").each(function () {
                    toolTipContent.push($(this).val());
                });
                toolTipContent.sort();
 
                toolTipContent.forEach(function (e) {
                    result = result + e + "<br/>";
                });
            }
            else {
                result = "0 selected"
            }
             
            return result;
        }
 
        function refreshToolTip() {
            this.refresh();
        }

When the tool tip initially is shown it shows the previous content and then it updates. I understand this it because it is going through my loop on the checked boxes but is there a way to hold off on showing the tooltip until it is updated or is there another event I should be using to update my tool tip?
Kiril Nikolov
Telerik team
 answered on 20 Aug 2013
1 answer
143 views
I can databind the grid to using DataSourceResult and HTTPGET no problems, the additional paramets are sent using querystring and readable through my WEB API controller.

My questions is can you/anyone provide an example of using HTTPOST and sending complex types as parameters?

How do you get around setting [FromBody] on the complex type yet still use the example below for HTTP model binder:



public DataSourceResult Method([ModelBinder(typeof(Imagine.Mvc.ModelBinders.KendoDataSourceRequestModelBinder))] DataSourceRequest request, 
            ComplexType object)
        {
            
        }
Nikolay Rusev
Telerik team
 answered on 20 Aug 2013
3 answers
237 views
I have pie chart that displays user data for all sites.  I want to be able to create another pie chart for only one site depending on the item clicked within the existing pie chart.  When I try to do that, however, I'm only able to load an empty bar chart, which ends up replacing the existing pie chart..

My code looks like this:


  <div id="chart" style="width:50%;"></div>
   <script>
       function createChart() {
           $("#chart").kendoChart({
               dataSource: {
                   transport: {
                       read: {
                           url: "getUserCountsBySite.admin?=siteId" + siteId,
                           dataType: "json"
                       }
                   },                            
               },

            title: {
               position: "top",
               text: "User Distribution by Site"
           },
           chartArea: {
               background: ""
           },                 
               seriesDefaults: {
               
                        type: "pie",
                        labels: {
                     visible: true,
                     template: "#= category # - #= kendo.format('{0:P}', percentage)#"
           }
        },                   
               
               series: [{
                           startAngle: 150,
                            field: "userCount",
                            categoryField: "description",
                          explodeField: "userCount"
                                   
               }],
               
               tooltip: {
                   visible: true,
                   format: "N0",
                   template: "#= category # - #= kendo.format('{0:P}', percentage)#"
               },
               
                seriesClick: onSeriesClick          
           });
       }
   function getDistributionBySubs(siteId) {
             $.ajax({
           type: "GET",
           url: "getUserCountsBySubscription.admin?siteId=" + siteId,
           success: function(response) {
                               
                     $("#chart").kendoChart();

}
 });
}
       function onSeriesClick(e) {
           console.log(kendo.format("Series click :: {0} ({1}): {2}",
               e.series.name, e.category, e.value));
               getDistributionBySubs(siteId);
               
               
       }
   
       $(document).ready(createChart);
 
   </script>
</div>   
Hristo Germanov
Telerik team
 answered on 20 Aug 2013
1 answer
111 views
Using the following example project for a multi-select in a Grid:
http://www.kendoui.com/code-library/permalink/boByv66aG2OF1P8AAFTdxQ

Failure steps
  1. Run the project as-is.
  2. Edit any grid line.
  3. Add a Territory by typing the first few letters and pressing enter to select the highlighted item.
  4. Save the grid line

Issue

In the Update action, the ModelState is not valid and the Territories list in the EmployeeViewModel has null entries for the first X items (equivalent the the number of items existing before the update). The data POSTed from the grid seems to be inconsistent. New items are posted as TerritoryViewModel-type objects but the existing items are posted as the value (id) only.

Note
Adding at least one item by clicking with the mouse magically resolves this issue and all items are posted as complete objects.
Georgi Krustev
Telerik team
 answered on 20 Aug 2013
1 answer
181 views
How to customize ASP.NET MVC autocomplete control to display the results as table format?

This feature is available in ASP.NET AJAX combobox.

Thanks,
Praba
Georgi Krustev
Telerik team
 answered on 20 Aug 2013
1 answer
425 views
Latest internal build 2013.2.819 has a black overlay on modal window. It seems to have overlay opacity set to 1 instead of the default .5
Is this a bug or a new feature where we need to set the default opacity on the overlay of modal window?
I'm running Firefox 23.0.1 browser.

Thanks.
Kiril Nikolov
Telerik team
 answered on 20 Aug 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
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
MultiColumnComboBox
Dialog
Chat
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
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
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?