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

I have requirement to allow user that he can add an event on some specific days of calendar. Ex. I am only available on every Monday and Tuesday for whole month. So, user who wants my appointment, can schedule meeting only those 2 days only. all other days will of the calendar will be shown as a grayed. no event can be fired with those days. Is this possible?

I want to show their color with gray background. so, user can easily identify these cells are not  available for scheduling meeting.

Please reply ASAP.
Vladimir Iliev
Telerik team
 answered on 03 Dec 2014
1 answer
180 views
Hi,

is there any way to get hold of the target html element in a event handler?

say e.g. in a ListView.dataBound event, how do I get hold of the ListView html element that is displaying the data?

Thanks,
Stevo
Stevo
Top achievements
Rank 1
 answered on 03 Dec 2014
1 answer
838 views
I'm trying to send filtering data of grid to controller to export data to excel.But I already have the data and I don't need to do a request to get it on client side, I'm filling the grid as the following code:

var dataSource = new kendo.data.DataSource({
data: result.Data,
pageSize: 25
});

$("#grid").kendoGrid({
autoBind: false,
columns: result.Columns,
dataSource: dataSource,
sortable: true,
filterable: true,
resizable: true
});
When I try to get the parameters, i can't because it doesn't exists

var grid = $("#grid").data('kendoGrid');

var parameters = grid.dataSource.transport.parameterMap({
filter: grid.dataSource.filter(),
page: grid.dataSource.page(),
pageSize: grid.dataSource.pageSize(),
sort: grid.dataSource.sort(),
group: grid.dataSource.group()
})

I get an error: Uncaught TypeError: undefined is not a function

If I try to serialize parametersMap without the function grid.dataSource.transport.parameterMap, its serialization occur in a wrong form and the MVC controller parameter can't get the filter value.But if I set a read URL on transport property of dataSource it works perfectly.

So, does anyone knows how to obtain parameterMap without have a read function on transport property ?
Regards!
Rosen
Telerik team
 answered on 03 Dec 2014
4 answers
302 views
Hi,

I'm trying to enable batch editing for a grid bound to an odata data source but having trouble using ParameterMap function to properly format a request.

I started from this example (https://github.com/telerik/kendo-examples-asp-net/tree/master/grid-odata-crud) and my code looks like this:
<html>
    <head>
        <meta charset="utf-8" />
        <title>OData CRUD</title>
        <link href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.common.min.css" rel="stylesheet" />
        <link href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.default.min.css" rel="stylesheet" />
        <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
        <script src="http://cdn.kendostatic.com/2012.1.322/js/kendo.all.min.js"></script>
    </head>
    <body>
        <div id="grid"></div>
        <script>
            $(document).ready(function () {
                var crudServiceBaseUrl = "/Northwind.svc/Products",
                    dataSource = new kendo.data.DataSource({
                        type: "odata",
                        transport: {
                            read: {
                                url: crudServiceBaseUrl,
                                dataType: "json"
                            },
                            update: {
                                url: function(data) {
                                    return crudServiceBaseUrl + "(" + data.ProductID + ")";
                                }
                            },
                            create: {
                                url: crudServiceBaseUrl
                            },
                            destroy: {
                                url: function(data) {
                                    return crudServiceBaseUrl + "(" + data.ProductID + ")";
                                }
                            },
                            parameterMap: function (data, operation) {
                                if (operation !== "read" && data.models) {
                                    //return { items: kendo.stringify(data.models) };
                                    return { data: kendo.stringify(data.models) };
                                }
                            }
                        },
                        batch: true,
                        pageSize: 10,
                        serverPaging: true,
                        schema: {
                            data: "d",
                            model: {
                                id: "ProductID",
                                fields: {
                                    ProductID: { editable: false, nullable: true },
                                    ProductName: { validation: { required: true } },
                                    UnitPrice: { type: "number", validation: { required: true, min: 1} },
                                    Discontinued: { type: "boolean" },
                                    UnitsInStock: { type: "number", validation: { min: 0, required: true } }
                                }
                            }
                        }
                    });
 
                    $("#grid").kendoGrid({
                        dataSource: dataSource,
                        height: 400,
                        pageable: true,
                        editable: true,
                        toolbar: ["create", "save", "cancel"],
                        columns: [                          
                            "ProductName",
                            { field: "UnitPrice", format: "{0:c}", width: "150px" },
                            { field: "UnitsInStock", width: "150px" },
                            { field: "Discontinued", width: "100px" },
                            { command: ["destroy"], title: " ", width: "110px" }]
                    });
            });
        </script>
    </body>
</html>


I've attached a demo project that includes my web service.

Thanks,
Griffin
Nikolay Rusev
Telerik team
 answered on 03 Dec 2014
7 answers
185 views
Since the Q3 release our code for navigation has become less than reliable.

We used to use app.pane.history to figure out the context of where we are in the application and navigate based on this information. It seems that now app.pane.history only contains one entry of the initial view.

Is there an alternate way for us to figure out where we are in the navigation and use that for our needs?

Thanks,
  Ron.
Petyo
Telerik team
 answered on 03 Dec 2014
1 answer
116 views
The kendo grid has a editable checkbox column, but once click the checkbox, the column headers are not aligned any more, it went back the status where the horizontal scroll bar  was at the beginning, not the current status.  Here a screenshot to show the problem I have, this occurs when I check/uncheck a checkbox in a column.
Alexander Popov
Telerik team
 answered on 03 Dec 2014
2 answers
322 views
How do I set the page size on the listview for MVVM?  the source for the listview and pager is just an array on the model.
Muhammad
Top achievements
Rank 1
 answered on 03 Dec 2014
2 answers
133 views
I'm successfully using the Upload widget to push files on a an Azure storage.
Accept only Excel file of a decent size, so sometimes, the controller on the server side will send an error message in the request response.
Now I can catch this with the 'error' event on client and would like to change the title attribute of the warning icon to show the error message.
How should I do that ?

BTW, using ASP.NET MVC 4, multiselect enabled & asynchonous upload.

Any hint wellcomed.
Christophe
Top achievements
Rank 1
 answered on 03 Dec 2014
4 answers
1.1K+ views
Hello,

I'm trying to access one SUM of a column in ClientFooterTemplate of another ClientFooterTemplate...

You can access the other's column's values in regular ClientTemplate but not in ClientFooterTemplate.

Example (Asp.Net MVC):

1.columns.Bound(cd => cd.Spend).Width(90)
2.    .ClientFooterTemplate("<span style='float:right'>#= kendo.format('{0:c}', sum) #</span>")
3.    .ClientTemplate("<span style='float:right'>#= kendo.format('{0:c}', Spend) #</span>");
4.columns.Bound(cd => cd.Cpc).Title("CPC").Width(75)
5.    .ClientFooterTemplate("<span style='float:right'>#= kendo.format('{0:N2}', Spend) #</span>")
6.    .ClientTemplate("<span style='float:right'>#= kendo.format('{0:N2}', Cpc) #</span>");
In the code above I'm trying to access Spend in row 5. Which is the sum in row 2.

Any ideas will be helpful.

And I'm just trying to get the other column's sum and if I'm successful the final calculation will be much more complex.


Thanks,
-Arek
AndyRutter
Top achievements
Rank 2
 answered on 03 Dec 2014
2 answers
117 views
I'm using Upload widget with multiselect and async.
Sometimes, mu controller will refuse a file on purpose, putting an error message in the resquest response.
How do I show this message as a tooltip on the ensuing warning icon ?
Dimiter Madjarov
Telerik team
 answered on 03 Dec 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
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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?