Telerik Forums
Kendo UI for jQuery Forum
4 answers
822 views
I have my grid setup in batch edit mode.  I have a requirement for a user to add multiple rows to the grid which I have by prompting the user for how many new rows they want to add then looping through and calling addRow method.  The problem is that it doesn't scale very well.  Adding 10 rows seems to work fine but by the time you get to 50 it takes upwards of 30 seconds to add those rows.  Is there anything I can do to make this faster or delay the redrawing of the grid as I add rows?
Keith Pepling
Top achievements
Rank 1
 answered on 12 Aug 2013
3 answers
174 views
I am using the file:http://demos.kendoui.com/web/grid/toolbar-template.html example as a starter for my page.
When the page loads I would like to set the filter drop down list and have that set the grid data right from the initial display of the page.

I can then call the page with http://demos.kendoui.com/web/grid/toolbar-template.html?Filter=Beverages
I would like to see "Beverages" in the grid toolbar and the grid would be filtered fshow Beverages only.

It seems a pretty common thing to do.
There are other threads about setting kendo drop downs but, that they are not inside a grid toolbar ...

Abrian
Top achievements
Rank 2
 answered on 12 Aug 2013
1 answer
838 views
How to stop popup a custom window?I use " e.preventDefault();" on edit event but it does not work,the edit window still popup.
Like this  sample,   I click the "Edit" button,  and popup the edit window.But sometimes I click the "Edit" button, but do not want to popup the custom window,I  want to alert("Can not edit"). I just want to popup the edit window when the Product Name is  "Chang" or  hide the "Edit" button when ProductName is not "Chang"
Alexander Valchev
Telerik team
 answered on 12 Aug 2013
4 answers
596 views
Hi,
I am using kendo charts in my application and through the button I am launching a popup to print the chart. Sometimes, the size of the chart is bigger than the content area of the pop up and it shows scrollbars, and beacause of the scrollbars I am not able to print the entire contents of the chart.

 Please let me know how I can resize the chart before printing it.

Thank you,

Poonam
Iliana Dyankova
Telerik team
 answered on 12 Aug 2013
1 answer
175 views
I'm trying to follow the example for populating the grid with remote data.  I've setup my controller to accept the DataSourceRequest param and, per the example, am getting the data from the DB and then calling ToDataSourceResult - which I assume will do the skip/take/count.

A little more detail:
I'm making a call to the DB using EF and calling an SP (not with "using db context" around call so the connection stays open after I return to the controller so the controller can do the skip/take/count).  Once the DB call is complete, I have ObjectResult<MyEntity_Result>.  I then select from this ObjectResult<> into an anonymous type and then call ToDataSourceResult.  The error I get is: "The result of a query cannot be enumerated more than once."

Now, if I call ToList() after I have selected my anonymous type from the ObjectResult<>, but before I call ToDataSourceResult, everything works well.  But, why would I want to call ToList(), especially if I have tons of data?

Second issue: Once I put ToList() on there and am getting data back, the grid isn't showing the data.  When I return the data without the ToDataSourceResult, and do my own skip/take I get data (but of course, I can't get count in addition to the skip/take since it will enumerate twice and throw an exception).  And if I do my own skip/take, the paging doesn't show more than one page when I know there are at least 10,000 records.

Here is the AJAX Controller Action method:

public JsonResult LoadAllUsers([DataSourceRequest]DataSourceRequest request)
{
    var repo = new AdminRepository();
    var users = repo.LoadAllUsers();
    var resp = users.Select(u => new
        {
            u.UserId,
            u.UserName,
            u.FirstName,
            u.LastName,
            u.EmailAddress,
            u.LastActivityDate,
        });
    var data = resp.ToList().ToDataSourceResult(request);
    // var data = resp.Skip(20).Take(20).ToList();
    return Json(data, JsonRequestBehavior.AllowGet);
}

Here is the js that is output:

$('#grid').kendoGrid({dataSource: {transport: {read: '/AdminJson/LoadAllUsers'},schema: {model: {fields: {UserId: { type: 'number' },UserName: { type: 'string' },FirstName: { type: 'string' },LastName: { type: 'string' },EmailAddress: { type: 'string' },LastActivityDate: { type: 'date' }}}},pageSize: 20,serverPaging: true,serverFiltering: false,serverSorting: true,scrollable: true},height: 430,pageable: true,filterable: false,sortable: true,columns: [{ field: 'UserId', title: 'User ID', sortable: false, filterable: false, groupable: false },{ field: 'UserName', title: 'User Name', sortable: true, filterable: false, groupable: false },{ field: 'FirstName', title: 'First Name', sortable: true, filterable: false, groupable: false },{ field: 'LastName', title: 'Last Name', sortable: true, filterable: false, groupable: false },{ field: 'EmailAddress', title: 'Email Address', sortable: true, filterable: false, groupable: false },{ field: 'LastActivityDate', title: 'Last Activity Date', sortable: true, filterable: false, groupable: false, format: '{0: yyyy-MM-dd HH:mm:ss}' }]});
Atanas Korchev
Telerik team
 answered on 12 Aug 2013
1 answer
86 views
Good morning.

I have a trouble using Kendo to make indexed list with local data for over a week.
The Kendo Music Store shows it, but it is for the remote data source. What I want is using local data.
I managed to make one, but it doesn't work. Only after resizing once, it works.
I tried to find a solution and stayed up all night over a week, but did not find it.
So, I put a point on the library files (kendo.min.js, etc).. as the one used in Kendo Music Store is not a recent one.
So I tried to use the older versions of kendo js files, but I can't find them neither.

I hope the master kendo programmers help me with this, and especially with the indexed list with local data problem.
Thank you.
Alexander Valchev
Telerik team
 answered on 12 Aug 2013
1 answer
126 views
Good morning.

I have a trouble using Kendo to make indexed list with local data for over a week.
The Kendo Music Store shows it, but it is for the remote data source. What I want is using local data.
I managed to make one, but it doesn't work. Only after resizing once, it works.
I tried to find a solution and stayed up all night over a week, but did not find it.
So, I put a point on the library files (kendo.min.js, etc).. as the one used in Kendo Music Store is not a recent one.
So I tried to use the older versions of kendo js files, but I can't find them neither.

I hope the master kendo programmers help me with this, and especially with the indexed list with local data problem.
Thank you.
Alexander Valchev
Telerik team
 answered on 12 Aug 2013
1 answer
128 views
Is kendo UI compatible with jquery mobile?
I want to use a date widget(mobile friendly, I know we have one in kendo as well), but it uses jquery mobile 1.3.2
I see a weired behavior, right after the login, i get redirected to the IIS7 welcome.png image.  So basically i cannot access my website.

Thanks
Kiril Nikolov
Telerik team
 answered on 12 Aug 2013
1 answer
241 views
When there are multiple category axes and negative values are present on a column chart, the axis labels collapse down to one line rather than being stacked as normal.  For example:

element.kendoChart({
seriesDefaults: {
type: "column"
},
series: [{
name: "Sales",
data: [10, 20, -0.5, 0, 100, 0],
}],
valueAxis: [{
majorGridLines: { visible: false },
title: { text: "Sales" },
}],
categoryAxis: [{
categories: ["Order", "Invoice", "Credit Memo", "Order", "Invoice", "Credit Memo"],
majorGridLines: { visible: false },
}, {
categories: ["Item", "Resources"],
line: { visible: false },
majorGridLines: { visible: false },
title: { text: "Type & Document Type" },
}],
});

Note that the 2 category axes labels simply collapse on top of one another with the words "Item" and "Invoice" on top of one another and the words "Resources" and "Invoice" on top of one another.  If I change the 3rd value in the series data from -0.5 to just 0.5, then the problem goes away and the 2 category axes are displayed correctly, one above the other.

This behavior seems like a bug since the axes are displayed correctly when the chart contains just positive values, but not if a negative value is present.  Is there some setting I'm missing?

Regards,
Hughes
Iliana Dyankova
Telerik team
 answered on 12 Aug 2013
1 answer
134 views
Does the DS have any way for me to capture and handle jsonp errors?

Is there a best practice?

I've tried this, but nothing happens (no alerts)

dataSource: new kendo.data.DataSource({
                    serverFiltering: true,
                    transport: {
                        read: {
                            url: function (e) {
                                var value = $("#activityTypeBox").data("kendoDropDownList").value();
 
                                if (value != "") {
                                    return "http://site/api/activities/getByType/id/" + value + "/format/jsonp"
                                }
                            },
                            dataType: "jsonp",
                            jsonpCallback: 'myCallback'
                        },
                        parameterMap: function (data, type) {
 
                        }
                    },
                    schema: {
                        errors: "error" // ex: twitter's response is { "error": "Invalid query" }
                    },
                    error: function (e) {
                        alert("Problem populating the curriculum db activities based on that type");
                    }
                })

Atanas Korchev
Telerik team
 answered on 12 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?