Telerik Forums
Kendo UI for jQuery Forum
3 answers
979 views
Hi,

My grid definition is as below

@(Html.Kendo().Grid(Model).Name("RegionAprv")
                                .TableHtmlAttributes(new { style = "table-layout: fixed; width:245px;" })       
                                .DataSource(dataSource => dataSource.Ajax()                                           
                                                                    .Model(model => model.Field(p => p.RegionUid).DefaultValue(0))
                                                                    .Model(model => model.Id(p => p.RegionUid)) 
                                                                    .Batch(false)
                                                                    .Read(read => read.Action("GridRead", "MyControl").Data("<js method>"))  
                                                                    .Create(create => create.Action("GridInsert", "MyControl").Data("<js method>"))
                                                                    .Update(update => update.Action("GridUpdate", "MyControl").Data("<js method>"))
                                                                    .Events(events => events.RequestEnd("<js method>")
                                                                                            .Error("<js method>")
                                                                                            )                                           )
                                .Columns(columns => {
                                    ....       
                                })
                                .EnableCustomBinding(false)
                                .Selectable()
                                .Editable(editing => editing.Mode(Kendo.Mvc.UI.GridEditMode.InLine))
                                .Events(events => events.DataBound("onGridDataBound")
                                                        .Save("onGridSave")
                                                        .Edit("onGridEdit")
                                                        .Change("onGridChange")
                                       )
                )


JQuery file

 onGridSave: function (e) {
                  ...
                },

On Save I am calling grid.saveRow(). It should exeute the onGridSave but it is not doing so. I once the breakpoint is on grid.saveRow() step over just does nothing.

Please help

Regards,
Sanjay   
Vladimir Iliev
Telerik team
 answered on 21 Jul 2014
1 answer
72 views
We are using the kendo grid with a detail table. All works well, untill we have a row with a key that has the character '#' in there. Then no requests to the server are made anymore to retrieve the detail data. There is no error or logging unfortunately, but I suspect it to be the # since that is used in the templating of the grid.
Should I escape the # sign in the key, or is there a different work around?

The Datasource definition of the detail template looks like this:

.DataSource(dataSource => dataSource
                .Ajax()
                .PageSize(5)
                .Read(read => read
                    .Action("Details", "Monitoring", new { projectionKey = "#=Key#" })
                    .Type(HttpVerbs.Post))
            )

Any help would be appreciated
Petur Subev
Telerik team
 answered on 21 Jul 2014
1 answer
223 views
Hi All;
I implemented foreign column. It seems. But it cannot be open!

You can see attached file for more detail. So that, I cannot see other list element except first!

Alexander Valchev
Telerik team
 answered on 21 Jul 2014
2 answers
109 views
Is it possible to have custom step incrementation in a cell depending on the value of a different cell in that row?
Nikolay Rusev
Telerik team
 answered on 18 Jul 2014
1 answer
157 views
Hi,

I'm getting an error when initializing a chart control using typescript, the category and value axis properties cause the error:

Specifically: 

Supplied parameters do not match any signature of call target:
Types of property 'categoryAxis' of types '{ title: { text: string; }; legend: { visible: boolean; }; series: kendo.dataviz.ui.ChartSeriesItem[]; categoryAxis: { title: { text: string; }; majorGridLines: { visible: boolean; }; majorTicks: { visible: boolean; }; [n: number]: kendo.dataviz.ui.ChartCategoryAxisItem; }; valueAxis: { max: number; title: { text: string; }; majorGridLines: { visible: boolean; }; visible: boolean; [n: number]: kendo.dataviz.ui.ChartValueAxisItem; }; }' and 'kendo.dataviz.ui.ChartOptions' are incompatible:
Type '{ title: { text: string; }; majorGridLines: { visible: boolean; }; majorTicks: { visible: boolean; }; [n: number]: kendo.dataviz.ui.ChartCategoryAxisItem; }' is missing property 'concat' from type 'kendo.dataviz.ui.ChartCategoryAxisItem[]'.

The interesting thing is that none of the other widgets I have used with typescript so far: grid, tabstrip, and map have had this issue. And I'm literally copying and pasting the json into the options object. How would I go about solving this problem?

Thanks!

Andre

T. Tsonev
Telerik team
 answered on 18 Jul 2014
1 answer
169 views
Hi,
I have duplicated the angular js example from telerik's website (http://demos.telerik.com/kendo-ui/sparklines/angular), but I am having some trouble rendering the chart. At times it will render correctly, whereas at other times the width and height seem to be way off.

Here is my code:
module.controller('TestController', ['$scope', '$timeout', function ($scope, $timeout) {
            $scope.weather = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: "test_json/weather.json",
                        dataType: "json"
                    }
                }
            });
        }])

<div data-kendo-sparkline
                                 data-k-series="[{
                                   type: 'column',
                                   field: 'TMax',
                                   color: '#ff0000',
                                   negativeColor: '#0099ff'
                                 }]"
                                 data-k-tooltip="{ visible: false, shared: false }"
                                 data-k-data-source="weather"
                                 data-k-chart-area="{ background: 'transparent' }"
                                 style="height:50px;"></div>

Any ideas why sometimes it will be ok, whereas other times it will not, and this happens in Chrome, FF and IE.

Thanks,

T. Tsonev
Telerik team
 answered on 18 Jul 2014
4 answers
1.8K+ views
Hi All,

I am making ajax call from grid to the server side and when there is an error happen on the server than no error shown on the grid.  I am using example from trial download on Hierarchical example

Here is view code:
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.EmployeeViewModel>()
        .Name("Employees")
        .Columns(columns =>
        {
            columns.Bound(e => e.FirstName).Width(140);
            columns.Bound(e => e.LastName).Width(140);
            columns.Bound(e => e.Title).Width(200);
            columns.Bound(e => e.Country).Width(200);
            columns.Bound(e => e.City);
        })
        .ClientDetailTemplateId("employeesTemplate")
        .Pageable()
        .DataSource(dataSource => dataSource
            .Ajax()
            .Read(read => read.Action("HierarchyBinding_Employees", "Grid"))
            .PageSize(5)
        )
        .Sortable()
        .Events(events => events.DataBound("dataBound"))
)
 
<script id="employeesTemplate" type="text/kendo-tmpl">
    @(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.OrderViewModel>()
            .Name("Orders_#=EmployeeID#")
            .Columns(columns =>
            {
                columns.Bound(o => o.OrderID).Width(101);
                columns.Bound(o => o.ShipCountry).Width(140);
                columns.Bound(o => o.ShipAddress).Width(200);
                columns.Bound(o => o.ShipName).Width(200);
            })
            .DataSource(dataSource => dataSource
                .Ajax()
                .Read(read => read.Action("HierarchyBinding_Orders", "Grid", new { employeeID = "#=EmployeeID#" }))
            )
            .Pageable()
            .Sortable()
            .ToClientTemplate()
    )
</script>
<script>
    function dataBound() {
        this.expandRow(this.tbody.find("tr.k-master-row").first());
    }
</script>

and here is controller code

using System;
using System.Web.Mvc;
using System.Linq;
using Kendo.Mvc.Extensions;
using Kendo.Mvc.UI;
 
namespace Kendo.Mvc.Examples.Controllers
{
    public partial class GridController : Controller
    {
        public ActionResult Hierarchy()
        {
            return View();
        }
 
        public ActionResult HierarchyBinding_Employees([DataSourceRequest] DataSourceRequest request)
        {
            throw new Exception("Test");        
        }
 
        public ActionResult HierarchyBinding_Orders(int employeeID, [DataSourceRequest] DataSourceRequest request)
        {
            return Json(GetOrders()
                .Where(order => order.EmployeeID == employeeID)
                .ToDataSourceResult(request));
        }
    }
}

My question is if grid itself doesn't handles exception on Ajax call, how to handle those sort of exceptions?

Thanks.
Alexander Valchev
Telerik team
 answered on 18 Jul 2014
2 answers
197 views
Is there any way to bind my ViewModel and change the mask according to my ViewModel Property?
eduardo
Top achievements
Rank 1
 answered on 18 Jul 2014
1 answer
147 views
Is it possible to get the category axis data when you hover over a point.  

For example, on the chart located here http://demos.telerik.com/kendo-ui/line-charts/index.

Instead of hovering over the points and seeing "Russian Federation: 4.743" you could see "Russian Federation (2002): 4.743" on the first point you hover over.  The axisCategory (in this case is the year) could be fetched.
Daniel
Telerik team
 answered on 18 Jul 2014
1 answer
607 views
Is it possible to use multiple data sources as multiple series in a chart?

For example
01.var Product1 = [
02.    {"Date": 2012-01-01, "Qty": 2},
03.    {"Date": 2012-02-01, "Qty": 10}
04.]
05.  
06.var Product2 = [
07.    {"Date": 2012-01-01, "Qty": 13},
08.    {"Date": 2012-02-01, "Qty": 17}
09.]


Can I use these two data sources in the same line chart?
T. Tsonev
Telerik team
 answered on 18 Jul 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
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?