Telerik Forums
Kendo UI for jQuery Forum
10 answers
517 views
Hi,

This is my first time using Kendo UI and am considering using for a new level project mid year :)
I am wanting to see if there is a way to 'destroy' a view - 

At the moment I have a view:

         <div data-role="view" data-stretch="true" id="map2" data-title="Map" data-show="startMap">
MAP GOES HERE
</div>

The logic grabs data to a local array and alters the map, however the view is cached once it is loaded
I have tried to use data-show but that crashes, I would like to know a way to totally delete a view if possible?
Destroy() did not do much for me.


If you have any other similar JSFiddle snippets I would be very greatful

Thanks

Daz.
Bill
Top achievements
Rank 1
 answered on 18 Jul 2013
1 answer
46 views
Hello,

http://demos.kendoui.com/web/scheduler/selection.html

Steps to reproduce the issue:

1. Open the above link.
2. Select event which have 6/13/2013 9:00 AM (Evaluations).
3. Issue is Partially selection color  -> Please check this screenshot for more information.



Thanks,
Jayesh Goyani
Dimo
Telerik team
 answered on 18 Jul 2013
1 answer
126 views
Hi,

The custom download builder is not working: http://www.kendoui.com/custom-download.aspx
 
Is it only for me?
Kiril Nikolov
Telerik team
 answered on 18 Jul 2013
2 answers
299 views
Hi,
I am facing a problem in rendering of Grid's footer.The Grid Footer Rendered wrongly by default , on opening fresh it looks attachement "Error_withoutData_1.JPG" but  if any Data is inserted within  the Grid only then it aligns  Correctly as expected  like in attachement "withData.JPG" .I had adjusted with the height attribute in the grid but no luck. 

$("#DDGrid")
.kendoGrid(
{
dataSource : DD_DataSource,
navigatable : true,
pageable : true,
height : 335, 
.....});

I am using  kendoui web,Framework .Anyone Pls help me out .,Thanks in Advance .
Regards,
Winds
Alexander Valchev
Telerik team
 answered on 18 Jul 2013
1 answer
131 views
As the title reads, is it possible to reverse the direction of a vertical linear gauge, so it starts to move from top to bottom? My scenario is the following:
I'm feeding the gauge with real time depth data, and I have defined top / surface to be at 0. When moving deeper, I'd like the pointer to move downwards towards the bottom of the gauge.

It moves fine with the real time data now, but in the wrong direction :)

Any suggestions?

<script>
    function createGauges() {
        $("#depthBar").kendoLinearGauge({
            pointer: {
                value: 0,
                shape: "arrow"
            },
 
            scale: {
                majorUnit: 1000,
                minorUnit: 500,
                min: 0,
                max: 12000,
                vertical: true,
            }
        });
    }
 
    $(document).ready(function() {
        createGauges();
    });
</script>
Nicklas
Top achievements
Rank 1
 answered on 18 Jul 2013
1 answer
1.5K+ views
Using this custom CSS I am able to remove all the borders on a gird. Works great.

/* Grids can't have borders */
.k-grid, .k-grid *   { border: 0 !important; }


the problem is that it removed borders from all the elements in the grid. How can I edit the CSS so that only the Gird has all the borders and lines removed, but all the child controls still have their borders?
Dimo
Telerik team
 answered on 18 Jul 2013
1 answer
133 views
Im pretty sure i have found a bug with the treeview.

Here is a fiddle that illistrates the problem: http://jsbin.com/ocaraj/3/edit

To see the bug open up a console window and drag a node into a node that you have not loaded,  ie. the nodes children have not been loaded. In the 'dragend' event (and possibly others) the e.sourceNode is null if you drop it on an unloaded node. But if the node has been loaded it works as normal, ie e.sourceNode is the dropped node.
Alex Gyoshev
Telerik team
 answered on 18 Jul 2013
1 answer
48 views
The following style was added to the kendo.metro.css on line 1025.

.k-menu.k-header,
.k-menu .k-item {
  border-color: #4c5356;
}

This is the only instance of this color in the file. Is this an intentional change?
The previous color was #dadada since .k-menu.k-header was undefined.
Dimo
Telerik team
 answered on 18 Jul 2013
1 answer
740 views
I have the following Razor code in a Template from a Column. The div inside the form renders fine, but strangely the <form> tags from the Html.BeginForm do not get rendered.

(I need a separate form in each of the cells)
columns.Bound(e => e.DisplayText).Title("ACTION").Template(
        @<text>
             @if (item.UserClient.IsActionAvailable())
                      {

         using (Html.BeginForm("Subscribe", "eServices", FormMethod.Post, new {id = @formId}))
       {
              <div id="@divId" class="subForm">
                 <input type="hidden" name="User" value="@clientId" />
             </div>
         }

Petur Subev
Telerik team
 answered on 18 Jul 2013
10 answers
311 views
Hello!

I'm starting to work with kendo but I'm having some trouble setting up a grid with inline edit mode and crud operations.

The read method is working and the grid is populated on page load with the two records fetched by the web service getallevents.
However, the other operations fail with the following messages:

Create
{"Message":"Invalid web service call, missing value for parameter: \u0027events\u0027.","StackTrace":" at System.Web.Script.Services.WebServiceMethodData.CallMethod(Object target, IDictionary`2 parameters)\r\n at System.Web.Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object target, IDictionary`2 parameters)\r\n at System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData, IDictionary`2 rawParams)\r\n at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"}
the data I get in browser is: 
{"eventid":null,"contextid":null,"eventname":"sd","eventdescription":"sd","eventprice":3}

Update and Destroy
{"Message":"Cannot convert object of type \u0027EventReady.kdEvent\u0027 to type \u0027System.Collections.Generic.IDictionary`2[System.String,System.Object]\u0027","StackTrace":" at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject)\r\n at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject)\r\n at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)\r\n at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input)\r\n at System.Web.Script.Services.RestHandler.GetRawParamsFromPostRequest(HttpContext context, JavaScriptSerializer serializer)\r\n at System.Web.Script.Services.RestHandler.GetRawParams(WebServiceMethodData methodData, HttpContext context)\r\n at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"}
the data I get in browser is:
{"__type":"EventReady.kdEvent","contextid":56,"eventid":2,"eventname":"Evento Teste","eventdescription":"Testedsds","eventprice":3}

Here is my ascx:
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="Events.ascx.vb" Inherits="EventReady.Events.Events" %>
<%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
<%@ Register TagPrefix="sas" Assembly="CoreReady.Web.UI" Namespace="CoreReady.Web.UI" %>
 
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
    <asp:Label ID="PageBlockID" runat="server" Visible="false"></asp:Label>
    <asp:Label ID="lblEventID" runat="server" Visible="false"></asp:Label>
    <asp:Panel ID="pnlList" runat="server">
        <div id="grid">
        </div>
        <script>
            <!--my script-->
        </script>
    </asp:Panel>
</telerik:RadAjaxPanel>

Here is my script:
<script>
 
            Sys.Application.add_load(LoadGrid);
 
            function LoadGrid() {
                $("#grid").kendoGrid({
                    dataSource: {
                        transport: {
                            read: {
                                url: "_portal/_widgets/eventready/events/wsev.asmx/getallevents",
                                contentType: "application/json; charset=utf-8",
                                type: "POST",
                                data: { ctxid: "<asp:literal id='lblContextID' runat='server' />" }
                            },
                            create: {
                                url: "_portal/_widgets/eventready/events/wsev.asmx/createevent",
                                contentType: "application/json; charset=utf-8",
                                type: "POST"
                            },
                            update: {
                                url: "_portal/_widgets/eventready/events/wsev.asmx/updateevent",
                                contentType: "application/json; charset=utf-8",
                                type: "POST"
                            },
                            destroy: {
                                url: "_portal/_widgets/eventready/events/wsev.asmx/destroyevent",
                                contentType: "application/json; charset=utf-8",
                                type: "POST"
                            },
                            parameterMap: function (options, operation) {
                                if (operation !== "read" && options.models) {
                                    return { events: kendo.stringify(options.models) };
                                }
                                else {
                                    return kendo.stringify(options);
                                }
                            }
                        },
                        schema: {
                            data: "d",
                            model: {
                                id: "eventid",
                                fields: {
                                    contextid: { editable: false, nullable: true },
                                    eventid: { editable: false, nullable: true },
                                    eventname: { type: "string" },
                                    eventdescription: { type: "string" },
                                    eventprice: { type: "number" }
                                }
                            }
                        }
                    },
                    height: 400,
                    sortable: true,
                    pageable: true,
                    toolbar: ["create"],
                    columns: [
                            {
                                field: "eventname", title: "Evento", width: "200px"
                            },
                            {
                                field: "eventdescription", title: "Descrição", width: "200px"
                            },
                            {
                                field: "eventprice", title: "Preço", format: "{0:c}", width: "200px"
                            },
                            { command: ["edit", "destroy"], title: " ", width: "210px" }
                    ],
                    editable: "inline"
                });
            };
         
        </script>

Here is my kdevent class:
Public Class kdEvent
 
    Public Sub New()
 
    End Sub
 
    Public Sub New(contextid As Integer, eventid As Integer, eventname As String, eventdescription As String, eventprice As Double)
        Me.contextid = contextid
        Me.eventid = eventid
        Me.eventname = eventname
        Me.eventdescription = eventdescription
        Me.eventprice = eventprice
    End Sub
 
    Private _contextid As Integer
    Public Property contextid As Integer
        Get
            Return _contextid
        End Get
        Set(ByVal value As Integer)
            _contextid = value
        End Set
    End Property
 
    Private _eventid As Integer
    Public Property eventid As Integer
        Get
            Return _eventid
        End Get
        Set(value As Integer)
            _eventid = value
        End Set
    End Property
 
    Private _eventname As String
    Public Property eventname As String
        Get
            Return _eventname
        End Get
        Set(value As String)
            _eventname = value
        End Set
    End Property
 
    Private _eventdescription As String
    Public Property eventdescription As String
        Get
            Return _eventdescription
        End Get
        Set(value As String)
            _eventdescription = value
        End Set
    End Property
 
    Private _eventprice As Double
    Public Property eventprice As Double
        Get
            Return _eventprice
        End Get
        Set(value As Double)
            _eventprice = value
        End Set
    End Property
 
 
End Class

And finally my web services:
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel
Imports xPortalReady
 
' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
<System.Web.Script.Services.ScriptService()> _
<System.Web.Services.WebService(Namespace:="http://tempuri.org/")> _
<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<ToolboxItem(False)> _
Public Class wsev
    Inherits System.Web.Services.WebService
 
    <WebMethod()> _
    Public Function getallevents(ByVal ctxid As Integer) As List(Of kdEvent)
 
        Dim dbEvent As New CoreReadyDAL.EventReady.EventReadyDataContext(xPortalReady.BasePage.getAppConnectionString(5, ctxid))
 
        Dim listEvents As New List(Of kdEvent)()
 
        Dim allEvent = (From ev In dbEvent.Events _
                            Where ev.Context_ID = ctxid _
                            Select ev)
        If Not allEvent Is Nothing AndAlso allEvent.Count > 0 Then
            For Each ev In allEvent
                listEvents.Add(New kdEvent(ctxid, ev.Event_ID, ev.Event_Name, ev.Event_Description, ev.Event_Price))
            Next
        End If
 
        Return listEvents.ToList
 
    End Function
 
    <WebMethod()> _
    Public Function createevent(ByVal events As List(Of kdEvent)) As List(Of kdEvent)
 
        Dim dbEvent As New CoreReadyDAL.EventReady.EventReadyDataContext(xPortalReady.BasePage.getAppConnectionString(5, events.Take(1).SingleOrDefault.contextid))
 
        Dim listEvents As New List(Of kdEvent)()
 
        For Each newEv In events
            Dim newEvent As New CoreReadyDAL.EventReady.Event
            newEvent.Context_ID = newEv.contextid
            newEvent.Event_Name = newEv.eventname
            newEvent.Event_Description = newEv.eventdescription
            newEvent.Event_Price = newEv.eventprice
            dbEvent.Events.InsertOnSubmit(newEvent)
            listEvents.Add(newEv)
        Next
 
        dbEvent.SubmitChanges()
 
        Return listEvents.ToList
 
    End Function
     
    <WebMethod()> _
    Public Sub updateevent(ByVal events As List(Of kdEvent))
 
        Dim dbEvent As New CoreReadyDAL.EventReady.EventReadyDataContext(xPortalReady.BasePage.getAppConnectionString(5, events.Take(1).SingleOrDefault.contextid))
 
        Dim listEvents As New List(Of kdEvent)()
 
        For Each newEv In events
            Dim currentEvent = (From e In dbEvent.Events _
                            Where e.Event_ID = newEv.eventid _
                            Select e).SingleOrDefault
            If Not currentEvent Is Nothing Then
                currentEvent.Event_Name = newEv.eventname
                currentEvent.Event_Description = newEv.eventdescription
                currentEvent.Event_Price = newEv.eventprice
            End If
        Next
         
 
        dbEvent.SubmitChanges()
 
    End Sub
 
    <WebMethod()> _
    Public Sub destroyevent(ByVal events As List(Of kdEvent))
 
        Dim dbEvent As New CoreReadyDAL.EventReady.EventReadyDataContext(xPortalReady.BasePage.getAppConnectionString(5, events.Take(1).SingleOrDefault.contextid))
 
        Dim listEvents As New List(Of kdEvent)()
 
        For Each ev In events
            Dim currentEvent = (From e In dbEvent.Events _
                            Where e.Event_ID = ev.eventid _
                            Select e).SingleOrDefault
            If Not currentEvent Is Nothing Then
                dbEvent.Events.DeleteOnSubmit(currentEvent)
            End If
        Next
         
 
        dbEvent.SubmitChanges()
 
    End Sub
 
End Class

I have tried lots of changes to the script and web services, but with no success.

Can you please help me with this issue?

Thanks in advance,

Ricardo.
Nikolay Rusev
Telerik team
 answered on 18 Jul 2013
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
Date/Time Pickers
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)
SPA
Filter
Drawing API
Drawer (Mobile)
Globalization
Gauges
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
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
OrgChart
TextBox
Effects
Accessibility
ScrollView
PivotGridV2
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Collapsible
Localization
MultiViewCalendar
Touch
Breadcrumb
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
Popover
DockManager
FloatingActionButton
TaskBoard
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
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?