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

I'm trying to do a foreach inside of a panelbar, lika the code further down. But i keep getting an error Compiler Error Message: CS1593: Delegate 'System.Action' does not take 1 arguments. Some help would be appreciated:)

panelbar.Add().Text("Soprutter")
                .Content(
                @<div>
                    <table class="table-hover">
                        <thead>
                            <tr>
                                <th>Soprutter <a onclick="editGarbageRoute(@Model.ID)" href="#garbageModal" style="display:inline-block;margin-left:5px;" data-toggle="modal" class="tooltips small button icon green" title="Ă„ndra soprutter" ><i class="icon-pencil"></i></a>
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach(var item in Model.GarbageRoutes)
                            {
                                <tr>
                                    <td>
                                        @Html.DisplayFor(modelItem => item.Description)
                                    </td>
                                </tr>
                            }
                        </tbody>
                    </table>
                </div>);
Mattias Hermansson
Top achievements
Rank 1
 answered on 20 Aug 2013
1 answer
171 views
Hi,

I've recently used the ThemeBuilder to customize the Metro theme. I only changed a couple items, including the Selected/Hovered states of controls to be Blue instead of the Metro default color.

However, ever since then my Editors do not display the Tool icons. If I can remember properly, these icons were Grey and changing the CSS would not change this. Is there something I missed when applying my ThemeBuilder css? Do I also need to download an image pack from somewhere?

Any help would be much appreciated.

Thanks,
Landon
Alex Gyoshev
Telerik team
 answered on 20 Aug 2013
1 answer
181 views
Hi,

I have tried to add badge on buttons in my layout but failed...
Would you suggest how to do that?

One of the buttons is located in the navbar of the layout. Other buttons are located in the navbar of some of the views.
Thanks.
Alexander Valchev
Telerik team
 answered on 20 Aug 2013
1 answer
223 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
186 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
154 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
291 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
470 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
168 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
255 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
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?