Telerik Forums
UI for ASP.NET MVC Forum
2 answers
173 views

Hi,

We are designing an application using ASP MVC , Fluent NHibernate and Kendo UI.
The client now has a requirement to abstract the datalayer(Entity Framework) using plane WCF service(notWCF 

 

 

 

Boyan Dimitrov
Telerik team
 answered on 13 Oct 2015
1 answer
231 views

Hello, I have recently downloaded the Kendo MVC toolkit planning to get it implemented for web app. I am confused not good with Jquery. In have used HTML decode function to pass a string data to the view. Where I decode it like @Html.Raw(WebUtility.HtmlDecode(Model.GetTreeLists())) inside a div and simple pass the id to Kendotreeview like

$("#treeData").kendoTreeView({
});

Now I have also a Kendo grid on a same view and I would like to populate the grid by selecting a record inside my treeview any suggestions would be appreciated..

Boyan Dimitrov
Telerik team
 answered on 13 Oct 2015
6 answers
2.0K+ views
I have kendo mvc wrappers in several projects, but in one project I keep getting this error, no matter what control I am using

0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'kendoButton'

I have checked my project again others that are working and I cant see any difference so I am concussed as to why it is not working.

Can you tell me what would cause this error  to helpme narrow it down.

I have the right scripts I believe and all scripts and css return a status 200

<script src="/Scripts/jquery-2.1.0.js"></script>
<script src="/Scripts/jquery.validate.js"></script>
<script src="/Scripts/jquery.validate.unobtrusive.js"></script>
<script src="/scripts/jscript/thatsfunctions.js"></script>
<script src="/scripts/jscript/site.js"></script>
<script src="/scripts/kendo/kendo.all.min.js"></script>
<script src="/scripts/kendo/kendo.aspnetmvc.min.js"></script>

I have the ref to the dll, I have the namespace in webconfig

<add namespace="Kendo.Mvc.UI" />

Any ideas would be appreciated, as I have spent hours trying to get this to work, thanks
Dimiter Madjarov
Telerik team
 answered on 13 Oct 2015
1 answer
140 views

The filter not work can you help me ? error serialization on call wcf.

DataSourceRequest 

 

http://www.telerik.com/forums/kendo-mvc-and-wcf

Kiril Nikolov
Telerik team
 answered on 13 Oct 2015
1 answer
132 views

I have the following model that I populate in the backend (controller):

public sealed class ItemGroupFlatModel
{
    public ItemGroupFlatModel()
    {
    }
 
    public int Id { get; set; }
 
    public string Name { get; set; }
 
    public string Description { get; set; }
 
    public int? ParentId { get; set; }
 
    public bool CanDelete { get; set; }
 
    public bool CanMove { get; set; }
 
    public bool AllowAdd { get; set; }
 
    public bool AllowEdit { get; set; }
}
 

and then pass to the front end using:

 

public JsonResult All([DataSourceRequest] DataSourceRequest request, int parentId)
{
    ItemGroupFlatViewModel model = _finderService.LoadFlatTreeModel(parentId);
 
    // null all parents that do not exist in tree
    List<int> ids = model.Children.Select(c => c.Id).ToList();
    model.Children.Where(c => c.ParentId.HasValue && !ids.Contains(c.ParentId.Value))
        .ToList().ForEach(c => c.ParentId = null);
 
    TreeDataSourceResult result = model.Children.ToTreeDataSourceResult(request,
        e => e.Id,
        e => e.ParentId,
        e => e
    );
 
    return Json(result, JsonRequestBehavior.AllowGet);
}

My Razor View is defined as:

<div class="demo-section k-header">
    @(Html.Kendo().TreeList<ItemGroupFlatModel>()
        .Name("itemgroup-treelist")
        .Columns(columns =>
        {
            columns.Add().Field(e => e.Name).Width(200); //.TemplateId("photo-template");
            columns.Add().Field(e => e.Description).Width(300);
            columns.Add().Width(200).Command(c =>
            {
                c.Edit();
                c.Destroy();
            });
        })
        .Editable(editable =>
        {
            editable.Move(true);
            editable.Mode("inline");
        })
        .Scrollable(true)
        .Selectable(true)
        .DataSource(dataSource => dataSource
            .Read(read => read.Action("All", "ItemGroup", new { parentId = Model.ParentId }))
            .ServerOperation(false)
            .Model(m =>
            {
                m.Id(f => f.Id);
                m.ParentId(f => f.ParentId);
                m.Expanded(true);
                m.Field(f => f.Name);
                m.Field(f => f.ParentId);
                m.Field(f => f.Id);
            })
        )
        .Height(540)
    )
</div>

I want to be able to control what can get dragged if  CanMove = true and prevent it if CanMove = false.  I want to prevent moving to a specific node if CanAdd = false and allow if CanMove = true.

Additionally, I want to prevent Delete if CanDelete = false.

Can this be done?

Cheers,

Andez

Alex Gyoshev
Telerik team
 answered on 13 Oct 2015
1 answer
137 views

We are working on an application in which the Grid control is being used to enter a number of line items which do not need to be stored in the database until the whole order is completed. We are using the batch editing mode and heavy client template use in order to get row data to fit the model of the page.

As part of the application, we want to automatically, via Ajax, populate item data when a user selects the item from a dropdown. Prior to moving to the batch edit mode, we were attempting to use the inline edit mode, and were able to attach our event handlers properly by calling a function off of the Grid's Edit() event handler, as it was called after the row was added to the DOM. We can bind the same function to the DataSource's Change() event, but this event fires before the new row is added to the DOM, so our event bindings fail.

What we would like is to be able to bind our events on row creation through the Grid or DataSource's initialization. If there is an alternate method to handle the controls in the row's event bindings, that is acceptable as well.

Kendo UI Version: 2015.2.902.545

OS: Windows 8 for development, Server 2008 R2 and up compatibility required

Browser: IE10+, Chrome (latest three)

jQuery: 2.1.4

 

Nathaniel
Top achievements
Rank 1
 answered on 12 Oct 2015
0 answers
64 views

We are working on an application in which the Grid control is being used to enter a number of line items which do not need to be stored in the database until the whole order is completed. We are using the batch editing mode and heavy client template use in order to get row data to fit the model of the page.

As part of the application, we want to automatically, via Ajax, populate item data when a user selects the item from a dropdown. Prior to moving to the batch edit mode, we were attempting to use the inline edit mode, and were able to attach our event handlers properly by calling a function off of the Grid's Edit() event handler, as it was called after the row was added to the DOM. We can bind the same function to the DataSource's Change() event, but this event fires before the new row is added to the DOM, so our event bindings fail.

What we would like is to be able to bind our events on row creation through the Grid or DataSource's initialization. If there is an alternate method to handle the controls in the row's event bindings, that is acceptable as well.

Kendo UI Version: 2015.2.902.545

OS: Windows 8 for development, Server 2008 R2 and up compatibility required

Browser: IE10+, Chrome (latest three)

jQuery: 2.1.4

Nathaniel
Top achievements
Rank 1
 asked on 12 Oct 2015
10 answers
526 views

Hi,

We are designing an application using ASP MVC , Entity Framework and Kendo UI.
The client now has a requirement to abstract the datalayer(Entity Framework) using plane WCF service(not WCF 
Dataservice as we need tcp).


So basically now our MVC controller will internally call the WCF service to get the data.
But we are not clear how to apply filtering , paging etc for the grid using this structure as there are no server wrapper available for WCF.

Here i have 2 questions.

1. Is there anything similar to 
DataSourceResult in wcf. i saw an example  http://www.kendoui.com/code-library/web/grid/grid-wcf---crud.aspx , but here the code is placed in AppCode. Is there any implementation example where I have a seprate wcf service and its methods taking a parameter DataSourceResult?

2. Or is there a way that I can pass the DataSourceResult from my MVC controller to a WCF plane service.?

Regards

Ramesh



Daniel
Telerik team
 answered on 12 Oct 2015
3 answers
82 views

Anyone know how to set the drawer control to not activate on swipe? I can't seem to set the SwipeToOpen property to false... Is this how you are supposed to do it?

 

    @(Html.Kendo().MobileDrawer()
        .Name("my-drawer")
        .SwipeToOpen(false)

 

...

 

 

Kiril Nikolov
Telerik team
 answered on 12 Oct 2015
1 answer
96 views

What is the maximum of Tasks in the Gantt Chart?

I notice a performance drop when tasks count is above 40...

Pavlina
Telerik team
 answered on 12 Oct 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Licensing
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
TimePicker
StockChart
RadialGauge
ContextMenu
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?