Telerik Forums
Kendo UI for jQuery Forum
2 answers
210 views
I am using the overload of ToDataSourceResult to postproceess my DBContext Entity into my model. However, I receive a LINQ error when I use it in the manner below. I know LINQ enough to understand the error, but I am confused because this forum post seemed to indicate the postprocessing expression would be used AFTER the object has been retrieved from the DBContext and not as part of the retrieval from the DBContext. Can you provide clarification?

My code:

DataSourceResult result = this.StateProvinceService
                .GetQueryable()
                .ToDataSourceResult<StateProvince, StateProvinceModel>(
                    request,
                    province => Mapper.Map<StateProvince, StateProvinceModel>(province));

The result:

LINQ to Entities does not recognize the method 'XYZ.Web.Areas.Admin.Models.StateProvinceModel Map[StateProvince,StateProvinceModel](XYZ.Model.StateProvince)' method, and this method cannot be translated into a store expression.

Mo
Top achievements
Rank 1
 answered on 23 Jul 2012
0 answers
114 views

Hi all,

I am trying to use the Kendo TreeView for a .NET application where people can edit a hierarchy. So far I have most of the client-side functionality implemented, whereby users can move, delete, rename nodes etc. My issue now is how to propagate those changes back to my application where server-side code will make database changes based on those client-side hierarchy changes. Can anybody advise me on the best way to propagate changes made to the treeview back to my .NET app? I’ve looked into the possibility of using a hidden field which I can post back on form submission but I’m not sure if this is the best way to go about it.

Kind regards,

Richard

Richard
Top achievements
Rank 1
 asked on 23 Jul 2012
2 answers
700 views
hi there,


i am evaluating the use of kendo mobile in my company and come across an issue i cannot resolve on my own. i use the latest minified version of the library from yesterday.

i have a view with a form that is bound to a viewmodel. on button click a function in the viewmodel is called which calls app.navigate to get to a listview with search results that are loaded as json array from a server based on the options entered in the form. 

the single parts work for me so far. i can pull the server response, parse the json and can edit the viewmodel with the form. when the user clicks the button to send the search, the listview will be initialized (via data-init) and the datasource will be updated with the correct search options from the viewmodel. 

but then the initializer is called a second time and only got the initial values from the viewmodel. i nailed it down to document.ready was called a second time and therefore the application state was lost. but i cannot figure out what is causing this.

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <link href="styles/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
    <link href="inwx.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="js/kendo.mobile.min.js" type="text/javascript"></script>
 
</head>
<body>
     
     
     
    <div id="menu" data-role="view" data-title="Start">
    <div class="head"> </div>
    <ul data-role="listview" data-style="inset" data-type="group" id="listview-menu">
        <li>I want to:
            <ul>
                <li data-icon="play"><a href="#searchform">search domains</a></li>
            </ul>
        </li>
    </ul>
</div>
 
    <div data-role="view" data-title="Destinations" id="domainlist" data-init="initListView">
    <ul data-role="listview" data-style="inset" data-type="group" id="listview-domains">
    </ul>
</div>
 
<div id="searchform" data-role="view" data-title="Domain Search" data-init="initForm">
    <form>
        <ul data-role="listview" data-style="inset">
            <li>
                <select id="region-value" data-bind="source: regions, value: region"></select>
                search region
            </li>
            <li>
                <input id="domain-value" type="text" data-bind="value: domain" />
                domain
            </li>
        </ul>
 
        <button data-bind="click: startSearch">search</button>
    </form>
</div>
 
<script type="text/x-kendo-template" id="domainlistItemTemplate">
    <li data-icon=
    # if (status == 'used') { #
         "globe"
    #} else {#
        "toprated"
    #}#>
        #: domain #    
    </li>
</script>
 
<script>
    var template = kendo.template($("#domainlistItemTemplate").html());
</script>
 
<script src="domainlist.js" type="text/javascript"></script>
 
</body>
</html>

var initForm;
var initListView;
 
$(document).ready(function(){
 
alert("ready");
 
var app = new kendo.mobile.Application(document.body);
 
var domainsearchModel = new kendo.data.ObservableObject({
    domain: "sebastian",
    region: "EUROPE",
    regions: ["EUROPE", "ASIA", "AMERICAS", "AFRICA", "ALL"],
    startSearch: function() {
        app.navigate("#domainlist");
    }
});
 
var domainlistSource = new kendo.data.DataSource({
    transport: {
        read: {
            url: "https://sandbox.inwx.de/en/domain/checkajax",
            type: "POST",
            dataType: "json",
            data: {
                d: function() {
                    return domainsearchModel.get("domain");
                },
                r: function() {
                    return domainsearchModel.get("region")
                }
            }
        }
    },
    schema: {
        data: function(data) {
            return data.items;
        },
        type: "json"
    },
    group: {
        field: "country"
    },
    filter: [{
        field: "status",
        operator: "neq",
        value: "error"
    }, {
        field: "status",
        operator: "neq",
        value: "timeout"
    }, {
        field: "status",
        operator: "neq",
        value: "yours"
    }, {
        field: "status",
        operator: "neq",
        value: "unsupported"
    }],
    pagesize: 20
});
 
    $("#listview-domains").kendoMobileListView({
        style: "inset",
        template: "#: domain #",
//      template: template,
        dataSource: domainlistSource
    });
 
initForm = function () {
    var body = $(".km-vertical,.km-horizontal");
 
    kendo.bind($("#searchform"), domainsearchModel);
};
 
initListView = function () {
     
 
};
 
});

Sebastian
Top achievements
Rank 1
 answered on 23 Jul 2012
1 answer
209 views
Hi,

I have created a Kendo grid, which is editable(inline). For the unique id(which we specify in "model" of grid definition), i have given a column name which has numbers(unique). Now, when the user adds a new row, this particular column has " " value. So, i myself add new values. Whenever some update or delete operations are performed, i need to perform some additional functionalities. So, i use this unique column values to retrieve the old/new row. Now, when i add a row, and update it, it works fine. But, then for the newly added row, if i click on "edit" and then click on "cancel", nothing happens. When i tried searching in source code, i could find that kendo generates some unique id internally, on adding new rows. But, when i click on cancel, the id that was generated by kendo is different. And it does not get the model itself. It is undefined. Can anyone suggest what should be done?

 _modelForContainer: function(container) {
            var id = (container.is("tr") ? container : container.closest("tr")).attr(kendo.attr("uid"));
            return this.dataSource.getByUid(id);
        },

In this piece of code(from kendo.grid.js), this.dataSource.getByUid(id) becomes undefined on click of cancel.

Regards,
Khushali
Alexander Valchev
Telerik team
 answered on 23 Jul 2012
8 answers
1.0K+ views
Hi,

I've got a simple mobile website with 3 separate pages.  When each page renders on the iphone, it renders the page without styling and quickly flickers to the correctly rendered view.  So for a grid, I see an ugly bullet list for a split second before it flickers to the nice looking grid.  This happens on all my pages.

How do I avoid this?

Kind regards

Nick
Alexander Valchev
Telerik team
 answered on 23 Jul 2012
0 answers
58 views
Ok, I have a form, and I have telerik RadGrid to lets user to add their information, all the information they add I want to put in session memory only. It mean if after they add the value if they click "Cancel" all information will gone. If they click " Submit Form" then all the value in the RadGrid will insert to database. How to do this? can someone show me tutorial?
Jack
Top achievements
Rank 1
 asked on 23 Jul 2012
0 answers
63 views
I am using MVC4 with the latest Kendo UI Q2. I am trying to use the mvc wrappers to implement a list view.

How can I stop the load icon displaying on the list view when using the MVC wrappers? when not using wrappers the following code in the datasource transport worked for me but how do I achieve the equivilent with wrappers?

parameterMap: function (options) {
    kendo.ui.progress($("#rolesListView"), false); 
    return options; 
}
Martin Kelly
Top achievements
Rank 1
 asked on 23 Jul 2012
0 answers
70 views
I am using MVC4 with the latest Kendo UI Q2. I am trying to use the mvc wrappers to implement a list view with a view template and an edit template.

How can I access the Ajax complete event when using the MVC wrappers?

@(Html.Kendo().ListView<iProjX.Models.RoleModel>(Model.Roles)
    .Name("rolesListView")       
    .TagName("div")       
    .ClientTemplateId("rolesList")       
    .Editable()
    .Pageable()
    .DataSource(dataSource => dataSource           
        .Model(model =>
            {
                model.Id("RoleId");
                model.Field(f => f.ProjectId).DefaultValue(Model.ProjectId);
                model.Field(f => f.Title);
                model.Field(f => f.Description);;
            })
        .Events(e => e               
            .Error("rolesListViewData_error")
            .Change("rolesListViewData_change")
            .RequestStart("rolesListViewData_requestStart"))          
        .Create(create => create.Action("createRole", "Project"))           
        .Read(read => read.Action("getRoles", "Project", new { projectId = Model.ProjectId }))
        .Update(update => update.Action("updateRole", "Project"))   
        .PageSize(30)           
     )
    .Events(e => e
        .Change("rolesListView_change")
        .Edit("rolesListView_edit")
        .DataBound("rolesListView_databound"))     
)
Martin Kelly
Top achievements
Rank 1
 asked on 23 Jul 2012
1 answer
305 views
All I can see on the "Build Your Custom Download" page is a dropdown with "Available versions", but no button/action to proceed any further (same on all browsers).

Is it not possible to download a custom library for Kendoui Mobile?

Thanks.
Dimo Mitev
Telerik team
 answered on 23 Jul 2012
2 answers
323 views
Our company has to decide between the use of KendoUI and the use of Telerik.

I understand Telerik Rad Controls are serverside and comes with databinding features that can be used in ASP.NET Code behind. 

I am specifically interested in knowing which one is better from the Client-Side standpoint.


Any input in this will be appreciated.
Atanas Korchev
Telerik team
 answered on 23 Jul 2012
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
ScrollView
Switch
TextArea
BulletChart
Licensing
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
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
ContextMenu
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
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?