Telerik Forums
Kendo UI for jQuery Forum
1 answer
175 views
I am using the following in my dataSource:

            transport: {
                read: {
                    contentType: "application/json; charset=utf-8",
                    url: "DepartmentHome.aspx/GetMembers",
                    dataType: "json"
                },
                create: {
                    url: "DepartmentHome.aspx/CreateMember",
                    type: "POST"
                },
                update: {
                    url: "DepartmentHome.aspx/EditMember",
                    type: "POST"
                },
                destroy: {
                    url: "DepartmentHome.aspx/DeleteMember",
                    type: "POST"
                }                
            },

and in my code behind I have defined the WebMethods as such:

        [WebMethod]
        public static void CreateMember()
        {
            File.WriteAllText(@"C:\testing.txt", "This is a create.");
        }

        [WebMethod]
        public static void EditMember()
        {
            File.WriteAllText(@"C:\testing.txt", "This is an update.");
        }

        [WebMethod]
        public static void DeleteMember()
        {
            File.WriteAllText(@"C:\testing.txt", "This is a delete.");
        }

When I create, edit, or delete a record it looks as if it has done it in the grid but it never calls the associated WebMethod.
I do see in firebug that it sends:
POST CreateMember
POST EditMember
POST DeleteMember

When I click on the associated buttons the POST data contains the parameters for that row:
FirstName: John
Id: 1
LastName: Smith

The Response back from the POST is just all the html from the page DepartmentHome.aspx.

I am using a WebMethod for read and that is working perfectly.  I don't know what the difference would be?

I have attached the complete source code.

Any help would be greatly appreciated.






Rosen
Telerik team
 answered on 23 Sep 2013
1 answer
107 views
Hi,
How do you define a stockchart series who's time interval is x minutes? as opposed to daily?

Any examples of a live / simulated live updated stockchart with volume? thanks!


 
Alexander Popov
Telerik team
 answered on 23 Sep 2013
1 answer
301 views
Dear all,
             i'm new to kendo ui and i'd tried the samples of scheduler 
with the scheduler datasource along with AJAX and WCF
the sample source below 
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="sheduler.aspx.cs" Inherits="WebApplication1.sheduler" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
     <link href="../../App_Global/styles/kendo.common.min.css" rel="stylesheet" />
    <link href="../../App_Global/styles/kendo.default.min.css" rel="stylesheet" />
    <script src="../../App_Global/js/jquery.min.js"></script>
    <script src="../../App_Global/js/kendo.all.min.js"></script>
    <script src="App_Global/js/kendo.web.min.js"></script>   
</head>
<body>
    <div></div>
    <div id="example" class="k-content">
    
    <div id="scheduler"></div>
</div>
<script>
    var url = 'Service1.svc/';
    var dataal;
    
    var dataSource1 = new kendo.data.SchedulerDataSource({
        batch: true,
        data:dataal,
        transport: {
            read: function (options) {
                $.ajax({
                    url: url + "getsheduler",
                    dataType: "json",
                   async: false,
                    cache:false,
                    success: function (result) {
                        
                        options.success(JSON.parse(result.d));                    
                     
                    },
                    error: function (result) {
                        alert("error");
 
                    }
                });
            }          
        },
        schema: {
            model: {
                id: "taskId",
                fields: {
                    taskId: { from: "taskid", type: "number" },
                    title: { from: "taskname", defaultValue: "No title", validation: { required: true } },
                    start: { type: "date", from: "credate" },
                    end: { type: "date", from: "duedate" },
                    startTimezone: { from: "StartTimezone" },
                    endTimezone: { from: "EndTimezone" },
                    description: { from: "Description" },
                    recurrenceId: { from: "RecurrenceID" },
                    recurrenceRule: { from: "RecurrenceRule" },
                    recurrenceException: { from: "RecurrenceException" },
                    ownerId: { from: "projectid", defaultValue: 1 },
                    isAllDay: { type: "boolean", from: "IsAllDay" }
                }
            }
        }
    });

    $(document).ready(function () {
        $("#scheduler").kendoScheduler({
            date: new Date("2013/9/13"),
            startTime: new Date("2013/9/13 07:00 AM"),
            selectable: true,
            height: 600,
            views: [
            "day",
                 "week",
               { type: "month", selected: true },
 
            ],
            timezone: "Etc/UTC",
            dataSource: dataSource1
                     
        });
       });
</script>
 
</body>
</html>
and WCF source below as

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Web;
using System.Text;
using Newtonsoft.Json;
using System.Data.SqlClient;
using System.Data;
namespace WebApplication1
{
    [ServiceContract(Namespace = "")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class Service1
    {
        
 
        String strConnString = "database=sample; server=URCI74;uid=sa;password=local";
        [OperationContract]
        public void DoWork()
        {
            // Add your operation implementation here
            return;
        }
 
        // Add more operations here and mark them with [OperationContract]
 
 
        [OperationContract]
        [WebGet]
        public object getsheduler()
        {
            SqlConnection con = new SqlConnection(strConnString);          
            SqlDataAdapter adpt = new SqlDataAdapter();
            DataSet ds = new DataSet();
            adpt = new SqlDataAdapter("select projectid as ownerId, taskname as title ,credate as start,duedate [end],startTimezone,endTimezone,description,recurrenceId,recurrenceRule,recurrenceException,isAllDay from sheduler
"
, con);
            adpt.Fill(ds);
            return JsonConvert.SerializeObject(ds.Tables[0]);
         
        }
    }
}

but it the data did not bind to the scheduler calendar and if i'm giving the data source without schema it works fine  

and my output from wcf service below in attached image


please solve the above issue

thanks & regards
-santhosh
Rosen
Telerik team
 answered on 23 Sep 2013
7 answers
492 views
Hi,

We have an ASP.NET MVC 3 project in which we need to show a chart similar to the one below : 

http://demos.telerik.com/aspnet-mvc/razor/chart/multipleaxes

Except that

1> I don't need to stack columns above each other .
2> I want to show a table below the chart with values as in this example  - http://telerik.com/help/aspnet-ajax/chart-plot-area-data-table.html


Can you please help in finding out the correct property / setting for the kendo chart for requirement #2 ? 


Regards,
Sandeep.
Sandeep
Top achievements
Rank 1
 answered on 23 Sep 2013
1 answer
112 views
Hello,
I've got 2 questions.
I'm using Tabstrips and i would like to let the user adding and closing them dinamically. Of course adding is supported and well documented, but i couldn't find how to do it without workaround like the one reported here:
http://www.kendoui.com/forums/kendo-ui-web/tabstrip/issues-with-dynamically-openned-tabs-and-closing-it.aspx
Is there an official way to make the tabs closable? Like "closable: true"?

Thanks in advantage.
Dimo
Telerik team
 answered on 23 Sep 2013
1 answer
128 views
I am attempting to hit an ASP.NET MVC controller action with the Kendo Datasource from the "Autocomplete" widget. The controller looks a bit like this ..


public JsonResult Aspect(string term){
  // ...
}
So I need the actual URL parameter to be called "term" from the dataSource. So given this..

$(".autocomplete").kendoAutoComplete({
    dataTextField: "Name",
    dataSource: {
        type: "json",
        transport: {
            read: "/search/aspect",
            data: { term: $(this).val() }
        }
    }
});
I can't seem to get this to work though.

Also, it is important to note that there are MULTIPLE auto-completes on the page with dynamic identities. So it cannot work to call a specific selector.

I have been looking for a few hours, and I'm not seeming to find a way to do this.
Atanas Korchev
Telerik team
 answered on 23 Sep 2013
2 answers
798 views

Hi,

I've set up a Kendo Grid, and am customising the filter interface to show all values in a DropDownList. Through the DropDownList DataSource object I'm grouping on the field to be displayed (thereby removing any duplicates).

This works fine and shows exactly those values which should show, however on selecting a value I get an error in the kendo.all.js change function at the following line:

sourceValue = sourceItem.get(field);

The error being "Object doesn't support property or method 'get'"

Is this a bug in Kendo, or am I doing something wrong?!

For reference, the DropDownList is set up using the following code which is called from the filter UI function for each individual column (this applies to several columns). The filter function is there to filter the values based on all filters applied to the grid (i.e. so each filter only shows those values which are currently present in the grid according to applied filters):

function setFilter(url, element, field) {
    element.kendoDropDownList({
        dataSource: {
            transport: {
                read: {
                    url: url,
                    data: {
                        filter: function() {
     
                            var filters = $("#AccountsGrid").data("kendoGrid").dataSource.filter();       
                            var result = {};
 
                            if (filters) {
                                result.logic = filters.logic;
 
                                var filterArray = new Array();
 
                                for (var i = 0; i < filters.filters.length; i++) {
                                    filterArray.push({
                                        operator: filters.filters[i].operator,
                                        field: filters.filters[i].field,
                                        value: filters.filters[i].value
                                    });
                                }
 
                                result.filters = filterArray;
                            }
                            return JSON.stringify(result);
                        }
                    }
                }
            },
            group: {
                field: field
            },
            serverFiltering: true
        },
        dataValueField: "value",
        dataTextField: "value",
        optionLabel: "--Select Value--"
    });
}
Andrew
Top achievements
Rank 2
 answered on 23 Sep 2013
1 answer
425 views
I followed the tutorial, part 2 hello services. I wanted to extend the example and use it in a real world app that I am putting together. But I am having a issue. Here is my json data returned from my service:

[{"CustomerId":"60506","CustomerName":"WILLIAMS COMFORT AIR          ","PartNumber":"34.120.           ","Vnd":"PV","SellPrice":"       1.45","UM":"EA ","Branches":[{"Id":2,"AvailQty":0,"Status":"A","Location":"St. Louis"},{"Id":3,"AvailQty":100,"Status":"A","Location":"Paducah"},{"Id":4,"AvailQty":138,"Status":"A","Location":"Ft. Wayne"},{"Id":5,"AvailQty":685,"Status":"A","Location":"Indianapolis"},{"Id":6,"AvailQty":185,"Status":"A","Location":"Louisville"},{"Id":7,"AvailQty":132,"Status":"A","Location":"Lexington"},{"Id":8,"AvailQty":2,"Status":"A","Location":"Evansville"}]}]
Here is my js:
<script>
    var dataSource = null;
 
    $(function () {
 
    });
 
    function Lookup() {
        var customer = $("#customer").val();
         
        if (customer == "") {
            customer = "60506";
        }
 
        dataSource = new kendo.data.DataSource({
            transport: {
                read: {
                    url: "api/part/",
                    data: {
                        partnumber: $("#part").val(),
                        customer: customer
                    }
                }
            }
        });
         
        dataSource.read();
 
        $("#partsGrid").kendoGrid({
            groupable: true,
            sortable: true,
            dataSource: {
                data: dataSource.data()[0].Branches,
                schema: "Branches"/*{
                    model: mySchema
                }*/
            }/*,
            columns: [{
                field: "CustomerId",
                title: "Id"
            }, {
                field : "CustomerName",
                title : "Name"
            }]*/
        });
    }
</script>
I want the datasource in an external var so I can ref other bit of information in it. In the end, I want a page with the customer name and customer id and the grid with each branch location and available quantity. Everything I've been reading suggest the datasource can not be a complex object. Is this true? What would be the best approach for me to take to get my results?

Thanks!
Daniel
Telerik team
 answered on 23 Sep 2013
2 answers
124 views
Hi 

I have bar charts and i am implementing drill downs in the chart. There are cases where there will be no data in the drill down  and at such times the screen will be blank with no indications. Is there a way to fix it?
Hari
Top achievements
Rank 1
 answered on 23 Sep 2013
13 answers
513 views
This:

<div id="splitter">

   <div id="left">Left pane</div>

   <div id="right"><iframe></iframe></div>

</div>



allows moving the splitter over the left, but gets lost when hovering over the iframe area.

How can you capture the mouse or set the z-index or whatever to capture the resize over the iframe.



[btw, it works if you are above or below the iframe part - just not over]

thx
Dimo
Telerik team
 answered on 23 Sep 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
Drag and Drop
Application
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
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?