Telerik Forums
Kendo UI for jQuery Forum
4 answers
344 views
Hi,

I'm just trying to play with the Scheduler and I get a compile error when I try to load the page.  Here is the compiler error:
Compilation Error
 
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
 
Compiler Error Message: CS0311: The type 'Shiner.ViewModels.CompanyEventVM' cannot be used as type parameter 'T' in the generic type or method 'Kendo.Mvc.UI.Fluent.WidgetFactory.Scheduler<T>()'. There is no implicit reference conversion from 'Shiner.ViewModels.CompanyEventVM' to 'Kendo.Mvc.UI.ISchedulerEvent'.
 
Source Error:
 
 
Line 19:
Line 20:
Line 21: @(Html.Kendo().Scheduler<Shiner.ViewModels.CompanyEventVM>()
Line 22:     .Name("scheduler")
Line 23:     .Date(new DateTime(2013, 6, 13))
At design time in the page, I have VS red squigly lines under the () of (bolded):  @(Html.Kendo().Scheduler<Shiner.ViewModels.CompanyEventVM>()

I have validated that the Kendo.MVC assembly is referenced correctly and has the latest version...2013.2.716.340.

I not sure where to go from here because everything else Kendo is working fine.

Thanks in advance.

Vladimir Iliev
Telerik team
 answered on 25 Jul 2013
4 answers
338 views
I'm trying to use the Splitter control in an MVC generated web page. For simplicity and to help debugging I've just copied the basic HTML example from the Kendo UI demo into a page I had started to build. The page has some other bits (Kendo Menu bar and various logo's and divs) but is otherwise the same as the demo HTML.

Unfortunately the splitter just displays all the panels scrunched up and collapsed on itself with contents all overlaid (see Attachment 1).  If however I resize the browser or just click F12 (in IE) to display the developer toolbar the splitter then magically sorts itself out and displays what I'd expected the first time (see Attachment 2).

Any ideas as to what could be causing this?  It happens in IE9 and Google Chrome and Firefox running under Windows 7 so doesn't appear to be a browser-specific issue. How can I get the splitter to display correctly on initial display instead of having to trigger some sort of refresh to get it to display correctly.  I am hooking up the splitter in $(document).ready as shown in the example, albeit after I've hooked up some Kendo menu controls and dropdown list controls.

I could attach the source code but it's the same code shown in the demo "Basic Usage" tab under "HTML" shoe-horned into a very basic index.cshtml page on a starter MVC 4 web site.

I'm using v2012.3.1315 of the Kendo UI libraries.

Dimo
Telerik team
 answered on 25 Jul 2013
4 answers
255 views
Okay so I'm using JSON.Net to convert an xml feed into JSON so load into the list view

PROBLEM is that the text content is defined with pound symbols as the prefix...and I have no idea how to bind that in the listview template

var templateHtml = "<div class='twit'>\
                        <h1>#: title.#cdata-section #</h1>\
                    </div>";
 
var templateHtml = "<div class='twit'>\
                        <h1>#: title.\\#cdata-section #</h1>\
                    </div>";

Nothing seems to work right...

If I just to #: title # it works, but clearly just shows [object Object]

Should also note I can't convert it in the schema as I need it to be generic and just give me the objects as-is

Ideas?
Kiril Nikolov
Telerik team
 answered on 25 Jul 2013
7 answers
224 views
Hi there,

I am having some problems to create a Master/Detail Grid on ASP.NET MVC
The connection to the SQL Database is created with Linq-to-sql, so I have the model. I have created two functions in the controller to get the data from the DB.

I am following the example shown here: http://demos.kendoui.com/web/grid/hierarchy.html
but is not working :/

here is my ASPX code:
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master"  Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h3>Users</h3>
<br />
<%: Html.Kendo().Grid<PaysmardService.Models.Users>("Users")
            .Name("grid")
            .Columns(columns =>
            {
                columns.Bound(e => e.FirstName).Width(110);
                columns.Bound(e => e.LastName).Width(110);
                columns.Bound(e => e.Country).Width(110);
                columns.Bound(e => e.City).Width(110);
                columns.Bound(e => e.Title);

            })
            .Sortable()
            .Pageable()
            .Scrollable()
            .ClientDetailTemplateId("template")
            .HtmlAttributes(new { style = "height:430px;" })
            .DataSource(dataSource => dataSource
                .Server()
                .PageSize(6)
                .Read(read => read.Action("Users", "Home"))
            )
            .Events(events => events.DataBound("dataBound"))
    %>

    <script id="template" type="text/kendo-tmpl">
        <%: Html.Kendo().Grid<PaysmardService.Models.Phones>("Phones")
                .Name("grid_#=ID#")
                .Columns(columns =>
                {
                    columns.Bound(o => o.PhoneNumber ).Width(100);
                    columns.Bound(o => o.IsBlocked ).Width(110);
                    columns.Bound(o => o.IsEnabled);
                    columns.Bound(o => o.DeviceType ).Width(200);
                })
                .DataSource(dataSource => dataSource
                    .Server()
                    .PageSize(5)
                    .Read(read => read.Action("Phones", "Home", new { ID = "#=ID#" }))
                )
                .Pageable()
                .Sortable()
                .ToClientTemplate()               
        %>
    </script>
    <script>
        function dataBound() {
            this.expandRow(this.tbody.find("tr.k-master-row").first());
        }
    </script>
</asp:Content>


here is my controller code:
        /////////////Phones/////////////
        public ActionResult Phones(int id)
        {
            _context = new DCPaysmardServiceDataContext();
            ViewData["Phones"] = _context.Phones.Where(phones => phones.UserFk == id);
            return View();
        }

        /////////////Users/////////////
        public ActionResult Users()
        {
            _context = new DCPaysmardServiceDataContext();
            ViewData["Users"] = _context.Users;

            return View();
        }


and the model is being created with the Linq-to-Sql.

I have tried everything .. but I dont get the selection button and the detail.
It would be very nice if you can give me a hand.

Thanks in advance.




Nikolay Rusev
Telerik team
 answered on 25 Jul 2013
12 answers
485 views
Hey guys -
First of all awesome work on a clean and easy-to-use HTML5 mobile UI framework. I have been working with stuff like Sencha, Jquery Mobile and Dojo Mobile, and I am pleased to see how much better your layout look and how much better performance seems to be. I also like the approach of adapting the layout to each platform it runs on so it seems more native.

I am going through the documentation and the examples and trying to figure out what would be the best way to get remote data from a REST API? Any suggestions (most of the other HTML5 mobile frameworks have wrappers for doing JSON-P requests and stuff like that)?

Great work again!
Dimitar
Daniel
Telerik team
 answered on 25 Jul 2013
2 answers
230 views
Hi!

We have a listView widget with endless scroll, bound to a datasource with a pagesize set to 10. We also use grouping on that datasource (one field, ascending).

The problem is that when new items are loaded in they form their own group, so we get many small groups of 10 items. We would like to ONLY group by the value in the group{field} and NOT group by pagesize. Any ideas?


- Example of how it is now and what we want to avoid -
Category (header)
Place (header)
Place (header)
Place (header)

- Example of what we want to achive -
Category (header)
Place (header)


Thanks!
Adrian
Top achievements
Rank 1
 answered on 25 Jul 2013
1 answer
95 views
Using this code I bind to a IDictionary<string,string> that has one item:

@(Html.Kendo().DropDownList()
      .Name("SelectedClientIdKendo")
      .HtmlAttributes(new { style = "width:200px" })
      .DataTextField("Key")
      .DataValueField("Value")
      .BindTo(Model.ClientList)
      )
The HTML looks ok that is rendered by the MVC wrapper, but the dropdownlist doesn't visually show any items in the list:

      <input id="SelectedClientIdKendo" name="SelectedClientIdKendo" style="width:200px" type="text" />
<
script>
    jQuery(function(){jQuery("#SelectedClientIdKendo").kendoDropDownList({"dataSource":{"2XXXXX":"2YYYYY"},"dataTextField":"Key","dataValueField":"Value"});});
</script>
                

Ian
Top achievements
Rank 2
 answered on 24 Jul 2013
2 answers
167 views
Hello,

I have the case where some of my editable data elements must be chosen from a drop-down list whose options are driven by external data. I have tried many different variations at accomplishing this with MVVM and have so far been unsuccessful. I've gotten edit and delete to work, as this simplified fiddle shows:

http://jsfiddle.net/D2maN/22/

but am stuck at the creation of new records. The problem is, I have no prior knowledge of the data in the dropdown so cannot hard-code default values in the schema. What I tried in that fiddle is creating a temporary, dummy default value to avoid the error, but now the problem is that if the user clicks "Add new record", and then just clicks "Update" right away (without changing the combobox), that dummy default gets saved (which in the real world breaks my application server-side because it's an invalid choice).

I have a lot of control over most aspects of this, so am open to any recommended approach for handling this case. I've looked through all of the demos a number of times but have been unable to locate one with this situation. The most promising theory I've though of so far is trying to find an event that I can use to programatically select the first element of the combobox in such a way as to actually update the viewModel right when the popup opens, but I can't seem to figure out how to do that. But, again, any way that works is fine with me...

Any thoughts or help would be greatly appreciated.

Thanks,
--Dan
Dan
Top achievements
Rank 1
 answered on 24 Jul 2013
1 answer
340 views
In the attached screenshot you can see that my financial data is date based. Sept, Dec and March (Quarters)

When I chart these 3 data points in a column chart, the chart adds Set,Oct,Nov,Dec,Jan,Feb,March.

I only want Sep,Dec and March to show and the columns to be then just really thick.

Is this possible?

Here's my chart:

Html.Kendo().Chart<AccountPerformance>(Model.Results)
                  .Name("chartPCT")
                  .Title("% Return")
                  .Legend(legend => legend.Visible(false))
                  .Series(series =>
                  series.Column(model => model.Metrics.Return)
                      .Name(Model.ColumnTitle)
                      .Labels(false))
                  .ValueAxis(axis => axis
                      .Numeric()
                      .Labels(labels => labels.Format("{0}%")))
                  .CategoryAxis(axis => axis
                      .Date()
                      .MajorGridLines(builder => builder.Visible(false))
                      .Categories(model => model.ObservationDate)
                      .Labels(labels => labels.Format("MMM")))
                  .SeriesDefaults(builder => builder.Column().NegativeColor("#BE2D55").Color("#C0BD7F"))
                  .Tooltip(tooltip => tooltip
                      .Visible(true)
                      .Color("white")
                      .Background("black")
                      .Format("{0:P2}")
                      .Template("#= value #")
                  )                                                        
                  .Render();
Iliana Dyankova
Telerik team
 answered on 24 Jul 2013
6 answers
551 views
With this data:
var fails = 
[
  { id: 0, name: 'zero', complex: { name: 'complex 0' } },
  { id: 1, name: 'one', complex: null }
];

And these columns:
var columns = 

  { title: "id", field: "id" },
  { title: "name", field: "name" },
  { title: "complex", field: "complex.name" }
];

This throws an exception and fails to render any data:
$("#fails").kendoGrid({
  dataSource: fails,
  columns: columns
});

JSBin demo here: http://jsbin.com/omuviw/3/edit
Cody
Top achievements
Rank 1
 answered on 24 Jul 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?