Telerik Forums
Kendo UI for jQuery Forum
1 answer
247 views
How do I get the result of an operation crud from the server and display in an alert?

Example
:

Kendo:

Datasource
    transport
    update
        url
        POST

On the server (php script):

       $ result = mysql comand
      echo json_encode($result)
- - - - - - - - - - - - -

How do I get back on kendo the $ result and show? just like:

alert ($ result)
Petyo
Telerik team
 answered on 21 Nov 2011
1 answer
199 views
I miss the event "beforeSelect".
I would like to perform a function that will hit the server (ajax) and returns some data for the selected node. However, if the operation fails node should not be selected.
Event "beforeSelect" would be fires when I click on the node, but before the event "select". If "beforeSelect" returns False, the event "select" should not be called.


Such an event should be in other widgets.


Alex Gyoshev
Telerik team
 answered on 21 Nov 2011
1 answer
163 views
No matter what page number I click on, a page index of 1 is sent to the server. Anyone know what I'm doing wrong? My code is below. Thanks!

$(document).ready(function () {
    $("#grid").kendoGrid({
        dataSource: {
            type: "json",
            transport: {
                read: "@Url.Content("~/reservation/grid")"
            },
            schema: {
                data: "results",
                total: "total"
            },
            pageSize: 25,
            serverPaging: true,
            serverSorting: true
        },
        height: getGridContentHeight(),
        scrollable: true,
        sortable: true,
        pageable: true,
        columns: [
            {
                field: "FormattedDate",
                title: "Date",
                width: "133px"
            },
            {
                field: "FirstName",
                title: "First Name"
            },
            {
                field: "LastName",
                title: "Last Name"
            },
            {
                field: "TableName",
                title: "Table Name"
            },
            {
                field: "PartySize",
                title: "Size"
            },
            {
                field: "HasNotes",
                title: "Notes",
                template: "#=HasNotes#" == "true" ? "<a href=\"javascript:void(0)\" onclick=\"openNotes(#=CustomerKey#, #=ReservationKey#)\">View Notes</a>" : "N/A"
            },
            {
                title: " ",
                template: '<a href="/admin/customer/profile?customerkey=#=CustomerKey#"><img src="@Url.Content("~/Content/Images/customer_profile.png")" alt="" /></a>',
                width: "131px"
            },
            {
                title: " ",
                template: '<a href="/admin/reservation/change?customerKey=#=CustomerKey#&reservationkey=#=ReservationKey#"><img src="@Url.Content("~/Content/Images/change.png")" alt="" /></a>',
                width: "77px"
            },
            {
                title: " ",
                template: '<a href="javascript:void(0)" onclick="openCancel(#=ReservationKey#)"><img src="@Url.Content("~/Content/Images/cancel.png")" alt="" /></a>',
                width: "77px"
            },
            {
                title: "Checked In",
                template: '<div id="checkin-processing-#=ReservationKey#" class="checkin-processing"><img src="@Url.Content("~/Content/Images/ajax-loader.gif")" alt="" /></div><input id="checkin-#=ReservationKey#" type="checkbox" #=CheckedIn# == true ? "checked=\"checked\"" : "" onclick="checkInOut(#=ReservationKey#, this.checked)" />'
            }
        ]
    });
});
gdycus
Top achievements
Rank 1
 answered on 20 Nov 2011
1 answer
72 views
hello,
can be forwarded to rx.php while the bar is moving

something like

 function sliderOnChange(e) {

url: "rx.php",
type="POST",
data: {name: "e.value"}

thank you very much

luca
Dimo
Telerik team
 answered on 18 Nov 2011
1 answer
145 views
Hello,

I need this sort of functionality (i.e. the side bars auto closing after opening + ability to pin them down)
http://layout.jquery-dev.net/demos/complex.html

1. Any plans to implement this in the splitter?
2. Do you have a suggestion / ideas about the best way to implement it?

Thank you,

Jared
Dimo
Telerik team
 answered on 18 Nov 2011
1 answer
759 views
With the following code, the chart does not even appear on the page when rendered..
<script type="text/javascript">
    function toDate(value) {
    var dateRegExp = /^\/Date\((.*?)\)\/$/;
    var date = dateRegExp .exec(value);
    return new Date(parseInt(date[1]));
}
$(document).ready(function () {
 
    var dsPriceHistoryChart = new kendo.data.DataSource({
        transport: {
            read: {
                url: "http://localhost/Data/GetPriceHistoryForChart?callback=?",
                dataType: "jsonp",
                data: {
                    "BeginDate": "2011-10-01",
                    "EndDate": "2011-10-27"
                }
            }
        },
        schema: {
            data: function(data){
                return $.parseJSON(data);
            }
        }
    });
 
 
 
            $("#PriceHistoryGrid").kendoGrid({
                groupable: true,
                sortable: true,
                pageable: true,
                scrollable: true,
                selectable: "row",
                dataSource: dsPriceHistoryChart,
                columns: [
                            {
                                field: "BusinessDate",
                                title: "Business Date",
                                template: '#= kendo.toString( toDate(BusinessDate), "MM/dd/yyyy" )#'
                            },
                            {
                                field: "EffectiveDate",
                                title: "Effective Date",
                                template: '#= kendo.toString( toDate(EffectiveDate), "MM/dd/yyyy" )#'
                            },
                            {
                                field: "Test1",
                                title: "Test1",
                            },
                            {
                                field: "Test2",
                                title: "Test2",
                            }
 
                ],
                 
            });
 
    $("#PriceHistoryChart").kendoChart({
        title: {
            text: "Price History"
        },
        dataSource: dsPriceHistoryChart,
        series: [
                {
                    type: "line",
                    field: "Test1",
                    name: "Test1"
                },
                {
                    type: "line",
                    field: "Test2",
                    name: "Test2"
                }
            ],
        categoryAxis: {
            field: "BusinessDate",
            labels:{
                rotation: -90,
                template: '#= kendo.toString( toDate(BusinessDate), "MM/dd/yyyy" )#'
            }
             
        }
    });
 
    dsPriceHistoryChart.read();
    
                         
 
});
</script>


The Grid displays things properly, but the Chart does not..
I had assumed the template item inside the categoryAxis.labels would be the equivalent to that of the Grid, am I mistaken?

If I remove the 'template' setting as follows, the chart displays - but with horrible looking dates, as they are returned from a WCF service.


$("#PriceHistoryChart").kendoChart({
        title: {
            text: "Price History"
        },
        dataSource: dsPriceHistoryChart,
        series: [
                {
                    type: "line",
                    field: "Test1",
                    name: "Test1"
                },
                {
                    type: "line",
                    field: "Test2",
                    name: "Test2"
                }
            ],
        categoryAxis: {
            field: "BusinessDate",
            labels:{
                rotation: -90
            }
             
        }
    });

NOTE: You may have noticed these lines and wondered why I am calling $.parseJSON in my datasource declaration..
schema: {
            data: function(data){
                return $.parseJSON(data);
            }

The reason for this is that I have to return a collection from C#, and to do so, I serialize a List<Dictionary<string,object>> object into javascript and return it to the page..  
Hristo Germanov
Telerik team
 answered on 17 Nov 2011
3 answers
161 views
Once again thanks for an awesome beta.

So since Telerik never fails here is the big issue issue that really will drive users crazy if not addressed prior to official release.

I found this link http://www.kendoui.com/forums/ui/window/laggy-window-moving.aspx because I did not wanna pester you if you already knew about it but I think this might slip through the cracks otherwise.

The bug I am about to describe does sometimes happen with your Ajax RadWindow control but not NEARLY as bad. I use the latest Telerik libraries for Ajax & Silverlight too.

Ok... I do most of my dev & testing in chrome and this is a 100% chronic bug.

RESIZE - Frankenstein Bug. There is no way to stop it once it starts. In other words I spend more time trying to get it to stop resizing. 

Use case: grab a corner, size, bottom (whatever)
Move till satisfied, click off it, or on it, or whatever. 

AT THIS POINT IT SHOULD STAY PUT!

But alas, Frankenstein is unhappy, and when you move the mouse away to do other stuff, lo & behold the window starts moving.

Nothing can stop it. Click, dblclick, escape, MAD CURSING!! 

Go go godzilla.

And MOVE has mad delay. It is like a black art. 

Now you really should be able to reproduce but I will make you a jing video if you cannot. Just ask.

Thanks very much.

I will still use these even with bugs because no HTML5 windows out there even come close. I realize you built all this stuff from the ground up but I wish you could have taken the RadAjax suite, rendered it in HTML, and then used that super mature powerful years in the making code to create Kendo UI. 

I congratulate you on this framework. I'm hooked.

Alex Gyoshev
Telerik team
 answered on 17 Nov 2011
1 answer
59 views
Hi Guys,

Will Kendoui controls work in both pc browsers and mobile devices without coding specifically for each?
In other words, will this framework allow one to develop a web page using Kendoui controls which displays in both Computer Browsers and Mobile devices without needing to code the webpage to support both devices?

Regards,
 LK
Dimo
Telerik team
 answered on 16 Nov 2011
1 answer
83 views
Hi,

Wanted to implement kendo splitter but alas I found this "deal breaker' bug when zooming for accessibility. 

I made a video to allow you to easily repro.

Thanks!

Cary

http://screencast.com/t/9GB6bxcC
Dimo
Telerik team
 answered on 16 Nov 2011
4 answers
527 views
I have a grid with the selectable option sat to "multiple, cell". I use the change() event on the Grid that fires when selection changes. In this callback function, I can call this.select() to get a jQuery object/array of objects of the selected element(s). So I have something like:

jQuery(td.k-state-selected, td.k-state-selected, td.k-state-focused, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected, td.k-state-selected)

Now, I could build something to copy this object's text content (or anything else, cause I have the jQuery object at hand) to the clipboard, but it's rather difficult to keep the table structure that I actually had in the table. How do I know which TD is the last in selection and is followed by a line break (new TR)? My selection was partial, so I can't use :last-child or similar since there are more TDs in this TR (see attached file).

Also, any way to stop the normal, in browser text selection when I have enabled selection of cells? 

And finally: any tips on a nice copy-to-clipboard solution? It'd be nice to do without Flash if possible, and browser requirements are rather high (IE8+).

Thanks.

/Jacob
Nikolay Rusev
Telerik team
 answered on 16 Nov 2011
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?