Telerik Forums
Kendo UI for jQuery Forum
1 answer
43 views
A kendo TreeView like this ,

$("#treeview").kendoTreeView({
                       dataSource: [
                           { text: "Furniture", expanded: true, items: [
                               { text: "Tables & Chairs",actionDirect:"doSomething",jsFunc:"func1" },
                               { text: "Sofas",actionDirect:"doSomething",jsFunc:"func2" },
                               { text: "Occasional Furniture",actionDirect:"doSomething",jsFunc:"func3" }
                           ] },
                           { text: "Decor", items: [
                               { text: "Bed Linen",actionDirect:"doSomething",jsFunc:"func4" },
                               { text: "Curtains & Blinds",actionDirect:"doSomething",jsFunc:"func5" },
                               { text: "Carpets",actionDirect:"doSomething",jsFunc:"func6" }
                           ] },
                           { text: "Storage",actionDirect:"doSomething",jsFunc:"func7" }
                       ],
                       select: onSelect,
                       dataUrlField: "actionDirect",
                   });

i want to do an ajax request, but i need get the ATTR "jsFunc" callback function after ,  how can i get it ?
tao
Top achievements
Rank 1
 answered on 02 May 2013
1 answer
85 views
Hi,

I'm using KendoUi framework web for one of the client projects and working on Grid component as part of my learning experience but some how I stuff with one of the issue as described below:

I created a webservice which returns the beneficiary data by passing input parameter  as part of the query string in webservice request as shown below

URL: http://127.0.0.1:7101/Rest/resources/beneficiaries/retrieve?memberNo=1&user=KK&externalId=11111&externalSys=IPP

Response : {"beneficiariesBeansList":[{"firstNm":"kriss","lastNm":"kilaru","middleNm":"k","percent":"49","relationCd":"01"},{"firstNm":"krishna","lastNm":"kilaru","middleNm":"k","percent":"51","relationCd":"01"}],"elapsedTime":"1016","exceptionCount":"0","exceptionString":"","externalId":"11111","externalSys":"IPP"}

Now in my page I created a datasource component as 

$("#ID").kendoGrid( {
                  dataSource : {
                                type: "odata",
                                serverPaging: true,
                                serverSorting: true,
                                pageSize: 100,
                                transport: {
                                    read: "http://127.0.0.1:7101/Rest/resources/beneficiaries/retrieve?memberNo=1&user=KK&externalId=11111&externalSys=IPP"
                                }
                    }, 
                  pageable : false, 
                  selectable: "single",
                  height : 450,
                  toolbar : [ { name: "create", text: "Add Beneficiary" }], 
                  columns : [   {field : "relationCd", title : "Relationship", width : "100px"},
                                {field : "firstNm", title : "First Name", width : "100px"},
                               // {field : "UnitsInStock", title : "Units In Stock", width : "100px", footerTemplate: "Total : #= sum#"},
                                {field : "middleNm", title : "Middle Name", width : "100px"},
                                {field : "lastNm", title : "Last Name", width : "100px"},
                                {command : ["edit"], title : " ", width : "60px"},
                                {command : {name : "bank", text : "Bank",click: showBankDetails }, title: " ", width: "60px" },
                                {command : {name : "destroy", text : "Remove", className: "btn-destroy"}, title : " ", width : "80px"}
                            ], 
                editable : "popup"
              });

A blank page rendered when page loaded and even I couldnt see any log files, so anyone could help me out where I went wrong inorder to display the data.

Thanks  a lot
Amar
Atanas Korchev
Telerik team
 answered on 02 May 2013
0 answers
121 views
I want to develop one shopping cart page . In  that page there is one label on top called "Total Price" and one check box list with item name and price

When I select any of the item that price should be added in Total Price, and I can select multiple times.
 
Can any one please tell me how can I achieve this functionality in kendo mobile ui ?
suucceess
Top achievements
Rank 1
 asked on 02 May 2013
4 answers
100 views
I have an application based off of the mobile music store example. I have cut everything down to the following in order to illustrate the problem.
I have 2 views, initial-view and detail-view.
The first view initial-view contains a listview of Ids pulled from a DataSource.
The second view performs a datasource.get on the id passed in the query string link to the view using the show event in order to grab the correct details from the datasource. However when you attempt to navigate from the listview link to the detail view, you get an immediate error after the view is shown with a #! in the url.

If you bind the initial-view listview to something else, a static array, or hard code the links to detail-view the show event and navigation to the detail-view works as expected.

Example attached.
Edit: Found that if I create another DataSource from the same original data.
var detailDS2 = new kendo.data.DataSource(
 {
         data:details,
         schema: {model: {id:"Id"}}
  });


If I then use that datasource in the show event of the detail-view to bind it works. Kind of a major hack though, I'd prefer to know what I am doing wrong or if this is a bug that will be fixed.
Travis
Top achievements
Rank 1
 answered on 02 May 2013
1 answer
188 views

I'm using Kendo MVVM.

I have a function on my viewModel which is determined in the show event.
So in the data-show I perform a
viewModel.set("clickFunction", clickFunction);

Then I try to bind in the view using:
<a data-bind="click: clickFunction">Click Me</a>
I have tried every way of binding the click event to the <a tag with no success.

The problem I am trying to solve is on the mobile device I need to navigate between several SPAs (Don't argue with me that it shouldn't be done this way, I have requirements which make this valid). So when trying to navigate between SPAs I have to use functionality provided by Cordova
changePage: function(url){
            window.location = url;
        }
However the url need to be built and have url parameters determined in a view show event.

If there is a better way of doing this in a listview <a styled element I am open to them.
Travis
Top achievements
Rank 1
 answered on 02 May 2013
2 answers
40 views
I have a kendo editor inside a modal jqueryui dialog. This editor uses the image browser. In IE8 the Upload button in the image browser doesn't work.

Perhaps it is an issue with z-index of the file upload element being lower than the z-index of the jqueryui dialog overlay.

Example code attached. Run it, click TEST, click the image browser button, click Upload. Nothing happens in IE8. This only occurs in real IE8, not IE8 emulated mode inside IE9 or 10.

I tried both the newest stable release and the newest beta of the editor - no difference.
Gregg Faus
Top achievements
Rank 1
 answered on 01 May 2013
6 answers
326 views
I don't fully understand why this is happening but it appears to be a bug.  Pardon not having full source code, I don't have time to extract the useful parts into a jsfiddle at the moment.

Essentially I have MVVM binding to a remote data source.

<input type="text" id="jobName" data-bind="value: data.Name" class="k-input validate" required />
 
var validatable = $("#windowUpdateJob").find("#jobName").kendoValidator().data("kendoValidator");

When I initialize the validator, it seems to break the jobName object.  Various things cause the following error:

kendo.all.js ~line # 7130 - this.widget.value is not a function

Without the validator it works ok.

I also found that if I just add a data-role to the <input> it also fixes the issue.  i.e.

<input type="text" data-role="NumericTextBox" id="jobName" data-bind="value: data.Name" class="k-input validate" required />


Maybe I'm doing something funky somewhere else in the code that's causing this?  I don't have a problem adding a data-role to all MVVM objects, but in this case jobName is not numeric - that's just the quickest thing I found that worked.
Zachary
Top achievements
Rank 1
 answered on 01 May 2013
2 answers
160 views
Hi,

I am using mvc kendo ui grid:
                    @(Html.Kendo().Grid<PortalUser>(Model.GetUsers())
                    .Name("Grid")
                    .Columns(columns =>
                    {
                        columns.Bound(p => p.ID).Width(200);                    
                        columns.Bound(p => p.UserName).Width(250);
                        columns.Bound(p => p.Password).Visible(false);
                        columns.Bound(p => p.Email).Width(250);
                        columns.Bound(p => p.Role.Name).Width(200).Title("Role");
                        columns.Bound(p => p.Comment).Width(300);
                        columns.Bound(p => p.IsLockedOut).Title("Locked").Width(100);
                        columns.Command(command => { command.Edit(); }).Width(100);
                        columns.Command(command => { command.Destroy(); }).Width(100);

                    })
                     .ToolBar(toolbar => toolbar.Create())
                     .Editable(editable => editable.Mode(GridEditMode.PopUp))
                    .Pageable()
                    .Sortable()
                    .Scrollable()
                    .Filterable()
                    .Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
                        .DataSource(dataSource => dataSource
                            .Ajax()
                            .Batch(false)
                            .ServerOperation(false)
                             .PageSize(50)
                             .Create(update => update.Action("Users_Create", "Membership"))
                            .Read(read => read.Action("Users_Read", "Membership").Data("FilterUsers"))
                            .Destroy(update => update.Action("Users_Delete", "Membership"))
                            .Update(update => update.Action("Users_Edit", "Membership"))
                            .Model(model =>
                                {
                                    model.Id(m => m.ID);
                                    model.Field(m => m.ID).DefaultValue(new Guid());
                                    model.Field(m => m.Role).DefaultValue(new PortalRole { RoleID = Guid.NewGuid(), Name = "no role" });
                                })
                        )
                        .HtmlAttributes(new { style = "height:500px" })
                )

I want the Role field to display as dropdown in the popup editor. So i have created a template file called RoleEditor.cshtml in Views\Shared\EditorTemplates.

I have also added the decoration attribute 
        [UIHint("RoleEditor")]
        public PortalRole Role { get; set; }
to the model class
I have followed all the steps given in your documentation:
http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/editor-template
and yet it does not work.



Dilip
Top achievements
Rank 1
 answered on 01 May 2013
2 answers
52 views
Hi, 

I am defining some columns for a kendogrid
            sortable: true,
            columnMenu: true,
            resizable: true,
            scrollable: false,
            columns: [
                { field: 'Owner', title: 'Owner' },
                { title: 'W-M', template: '#= WeightCarried # | #= Medication # '},
            ]

Why does the Owner column have a columnMenu, is resizable, and sortable, but the other column cannot do any of these?

Is this a limitation when using a template? Or am I simply missing some additional option?
Jordon
Top achievements
Rank 1
 answered on 01 May 2013
3 answers
96 views
I've had a very difficult time trying to get FX transfer (http://docs.kendoui.com/api/framework/fx/transfer) to simply move a div from one position to another.  It seems like to would be very straightforward.  However, it wasn't.  I tried to work backwards from the transfer demo (http://demos.kendoui.com/web/fx/transfer.html) and finally, after much trial and error, I was able to accomplish it (sort of).  

Please see this jsfiddle .  The trick to get it to work was to make the height/width of #Finish 1px less than #Start. However, I don't want to have to change the height/width.  I just want the div to move (I also discovered that I could get it to work with height/width of 110px if I added a border.  However, I don't want a border).  So, my question is, is this a bug?  Shouldn't I be able to use transfer to move a div without changing the height/width or adding a border?  If there is a way, please let me know.



Petyo
Telerik team
 answered on 01 May 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
Chat
DateRangePicker
Dialog
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
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?