Telerik Forums
Kendo UI for jQuery Forum
2 answers
760 views
In my mobile application, I got the above error when i replace Q2 kendo.mobile.min.js into Q3 kendo.mobile.min.js.
Thanks in advance.
Andrew Paulson
Top achievements
Rank 2
 answered on 14 Dec 2012
1 answer
97 views
Hi All,

In my mvc view, I have 2 List-views. In one of the  List-view, only 2 or 3 items will displayed when another List-view will have 10 items per page simultaneously. Even though, first list-view display only 1 or 2 or 3.., list-view size should be same along with second list-view which is displaying 10 items in the page. Currently, what is happening is first list-view size is reducing. How to overcome this problem? I am attaching screen shot. Immediate help will be appreciated.

Below is my code

 @(Html.Kendo().ListView<Model>()
        .Name("sites")
        .Events(events => events.DataBound("OnDataBound"))
        .TagName("div")
        .ClientTemplateId("template")
        .DataSource(source =>
        source.Read(read => read.Action("Action", "Controller"))
        .PageSize(10))
        .Selectable(selection =>
        {
            selection.Enabled(true);
            selection.Mode(ListViewSelectionMode.Multiple);
        })
        .Pageable(pager => { pager.PageSizes(true);})
        )
Regards,
Partha.
Iliana Dyankova
Telerik team
 answered on 14 Dec 2012
1 answer
345 views
Hello,
I'm developing a mobile application that contains a scrollview within a PDF document renders with PDF.js (Mozilla).

The problem is that the scrollview does not allow us to scroll down and we can only see a part of the pdf file.

Here is a sample project to show the problem : http://www.mediafire.com/?9md21u9zy56dwkd

Any idea ?
Thank's in advance,
Petyo
Telerik team
 answered on 14 Dec 2012
1 answer
192 views
I have a nested ViewModel structure, with a custom editor on the grid that can edit the List of 'Items' on the QuestionLifeCycleAssignmentViewModel.

Here is the ViewModel:
public class AssignedQuestionViewModel
{
    public int QuestionTemplateId { get; set; }
    public int QuestionGroupTemplateId { get; set; }
    public string QuestionText { get; set; }
    public bool Required { get; set; }
    public string RequiredCheckedString { get; set; }
    public QuestionLifeCycleAssignmentViewModel LifeCycle { get; set; }
}
 
public class QuestionLifeCycleAssignmentViewModel
{
    public List<QuestionLifeCycleAssignmentItemViewModel> Items { get; set; }
    public string SelectedLifeCycleCsvList { get; set; }
}
 
public class QuestionLifeCycleAssignmentItemViewModel
{
    public string LifeCycleDescription { get; set; }
    public int LifeCycleId { get; set; }
    public bool Assigned { get; set; }
    public string LifeCycleAbbreviation { get; set; }
 
}

Here is the View:
@(Html.Kendo().Grid<AssignedQuestionViewModel>()
      .Name("Questions_#=QuestionGroupTemplateId#")
      .Columns(columns =>
                   {
                       columns.Bound(i => i.QuestionTemplateId).Hidden();
                       columns.Bound(i => i.QuestionGroupTemplateId).Hidden();
                       columns.Bound(i => i.Required);
                       columns.Bound(i => i.QuestionText);
                       columns.Bound(i => i.LifeCycle).ClientTemplate("\\#=LifeCycle.SelectedLifeCycleCsvList\\#");
                   }
      )
      .ToolBar(toolBar => toolBar.Save())
      .Editable(editable => editable.Mode(GridEditMode.InCell))
      .DataSource(dataSource => dataSource
                                    .Ajax()
                                    .Batch(true)
                                    .ServerOperation(false)
                                    .Model(model =>
                                               {
                                                   model.Id(m => m.QuestionTemplateId);
                                                   model.Field(m => m.QuestionTemplateId).Editable(false);
                                                   model.Field(m => m.QuestionGroupTemplateId).Editable(false);
                                                   model.Field(m => m.QuestionText).Editable(false);
                                               })
                                    .Read(read => read.Action("ReadAssignedQuestions", "QuestionManagement", new { p = "#=QuestionGroupTemplateId#"})
                                                      .Type(HttpVerbs.Post)                                                         
                                    )
                                    .Update(update => update.Action("SaveAssignedQuestions", "QuestionManagement"))
      )
      .Events(e => e.Edit("testEvent"))
      .ToClientTemplate()
      )

Here is the Controller:
[HttpPost]
  [HandleJsonException]
  public ActionResult SaveAssignedQuestions([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")] IEnumerable<AssignedQuestionViewModel> models)
  {
      var result = _questionManagementHelper.SaveQuestionAssignmentEdits(models);
      return Json(GetJsonResponse(result, "An error occurred saving assigned question edits."));
  }

Breaking in the controller, copied from the Watch window:

-       LifeCycle   {Esurety.Core.ViewModels.QuestionManagement.QuestionLifeCycleAssignmentViewModel}   Esurety.Core.ViewModels.QuestionManagement.QuestionLifeCycleAssignmentViewModel
-       Items   Count = 6   System.Collections.Generic.List<Esurety.Core.ViewModels.QuestionManagement.QuestionLifeCycleAssignmentItemViewModel>
-       [0] {Esurety.Core.ViewModels.QuestionManagement.QuestionLifeCycleAssignmentItemViewModel}   Esurety.Core.ViewModels.QuestionManagement.QuestionLifeCycleAssignmentItemViewModel
        Assigned    false   bool
        LifeCycleAbbreviation   null    string
        LifeCycleDescription    null    string
        LifeCycleId 0   int
It is kind of hard to read, but you can see that the List of Items has 6 Items, which is a property of LifeCycle, which is a property of the top-level AssignedQuestionViewModel.  Everything is correct (the count of items is correct), except the Items have no values (you can see the nulls and 0 for the ID, and Assigned is always false even when it isn't supposed to be).  When I inspect in fiddler, using the WebForms tab, the data is correct, so it is being submitted, it is the binding that is not working correctly.  Here is from Fiddler WebForms:

group
filter
models[0].QuestionTemplateId 1
models[0].QuestionGroupTemplateId 1
models[0].QuestionText First Name
models[0].Required true
models[0].RequiredCheckedString checked
models[0].LifeCycle.Items[0][LifeCycleDescription] Bond Application
models[0].LifeCycle.Items[0][LifeCycleId] 1
models[0].LifeCycle.Items[0][Assigned] true
models[0].LifeCycle.Items[0][LifeCycleAbbreviation] Nb

And here is the TextView:

sort=&group=&filter=&models%5B0%5D.QuestionTemplateId=1&models%5B0%5D.QuestionGroupTemplateId=1&models%5B0%5D.QuestionText=First+Name&models%5B0%5D.Required=true&models%5B0%5D.RequiredCheckedString=checked&models%5B0%5D.LifeCycle.Items%5B0%5D%5BLifeCycleDescription%5D=Bond+Application&models%5B0%5D.LifeCycle.Items%5B0%5D%5BLifeCycleId%5D=1&models%5B0%5D.LifeCycle.Items%5B0%5D%5BAssigned%5D=true&models%5B0%5D.LifeCycle.Items%5B0%5D%5BLifeCycleAbbreviation%5D=Nb&models%5B0%5D.LifeCycle.Items%5B1%5D%5BLifeCycleDescription%5D=Renewal&models%5B0%5D.LifeCycle.Items%5B1%5D%5BLifeCycleId%5D=2&models%5B0%5D.LifeCycle.Items%5B1%5D%5BAssigned%5D=true&models%5B0%5D.LifeCycle.Items%5B1%5D%5BLifeCycleAbbreviation%5D=Rw&models%5B0%5D.LifeCycle.Items%5B2%5D%5BLifeCycleDescription%5D=Cancellation&models%5B0%5D.LifeCycle.Items%5B2%5D%5BLifeCycleId%5D=4&models%5B0%5D.LifeCycle.Items%5B2%5D%5BAssigned%5D=false&models%5B0%5D.LifeCycle.Items%5B2%5D%5BLifeCycleAbbreviation%5D=Cn&models%5B0%5D.LifeCycle.Items%5B3%5D%5BLifeCycleDescription%5D=Reinstatement&models%5B0%5D.LifeCycle.Items%5B3%5D%5BLifeCycleId%5D=6&models%5B0%5D.LifeCycle.Items%5B3%5D%5BAssigned%5D=false&models%5B0%5D.LifeCycle.Items%5B3%5D%5BLifeCycleAbbreviation%5D=Ri&models%5B0%5D.LifeCycle.Items%5B4%5D%5BLifeCycleDescription%5D=NonPBR&models%5B0%5D.LifeCycle.Items%5B4%5D%5BLifeCycleId%5D=7&models%5B0%5D.LifeCycle.Items%5B4%5D%5BAssigned%5D=false&models%5B0%5D.LifeCycle.Items%5B4%5D%5BLifeCycleAbbreviation%5D=Np&models%5B0%5D.LifeCycle.Items%5B5%5D%5BLifeCycleDescription%5D=PBR&models%5B0%5D.LifeCycle.Items%5B5%5D%5BLifeCycleId%5D=8&models%5B0%5D.LifeCycle.Items%5B5%5D%5BAssigned%5D=false&models%5B0%5D.LifeCycle.Items%5B5%5D%5BLifeCycleAbbreviation%5D=Pb&models%5B0%5D.LifeCycle.SelectedLifeCycleCsvList=Nb%2CRw


Thanks!
Danny
Daniel
Telerik team
 answered on 14 Dec 2012
1 answer
176 views
I have a grid that is populate based on a data source that is changed according to user search criteria. Web page is not refreshed when updating the grid. Here is the problem, Let say that I grouped the grid based on column A after the first search. If I click on the search again with or without changing the search criteria and repopulate the data to the grid, it no longer allow me to group based on any other column except column A ( previous grouping ).

Here is the extract of the code that does the data binding:
 $.ajax({
                    type: "POST",
                    async: true,
                    timeout: 60000,
                    url: serviceMaterialsUrl,
                    data: paramsData,
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {
                        $("#grid").val('');
                        $("#grid").html('');
                        $("#grid").kendoGrid({
                            editable: false,
                            dataSource: { 
                                data: data.d,
                                pageSize: 100
                            },
                            sortable: { 
                                mode: "multiple",
                                allowUnsort: true
                            },
                            filterable: true,
                            groupable:true,
                            scrollable:true,
                            resizable: true,
                            columnMenu: true,
                            pageable: {pageSizes: [100, 200, 300]},
                            detailInit: detailInit,
                            columns: [
                                { field: "select", ..." },
                                { field:..... }
                            ]
                        });
                    },
                    error: function (err) {
                        alert('Error');
                    }
                });
Petur Subev
Telerik team
 answered on 14 Dec 2012
3 answers
587 views
Hi All,

How to display "No items to display" in the middle of List view body?
Please do the needful as soon as possible.

Regards,
Partha.
Iliana Dyankova
Telerik team
 answered on 14 Dec 2012
2 answers
114 views
Hello,

can I use FX with Kendo Mobile?

Even declaration fails
    <script src="js/jquery-1.8.2.js" type="text/javascript"></script>
    <script src="js/kendo.all.js" type="text/javascript"></script>
    <link href="css/kendo.common.css" rel="stylesheet" />
    <link href="css/kendo.default.css" rel="stylesheet" />
    <link href="css/kendo.mobile.all.css" rel="stylesheet">
  <div data-role="view" data-layout="layout">
  <div data-role="content">
            <div id="foo">
                I will be animated
            </div>        
        </div>    </div>
var
effectWrapper = kendo.fx($("#foo")); Thanks for help.
axel
Top achievements
Rank 1
 answered on 14 Dec 2012
1 answer
306 views
I have a page with a chart on it that works great on most browsers I've tried.  However, when I run this page on an iPad, then the fetch data fails with an Unauthorized exception.  I've logged on and the authorization cookie should be send to my MVC WebAPI page which is secured to authorized users only.  Is there some way to ensure that the proper cookies are sent with each request?

Thanks!

Lyle

      function createChart() {
        chartDataSource = new kendo.data.DataSource({
          transport: {
            read: {
              url: function () {
                return "/api/TEDMinute/" + CurrentDeviceId + "?QueryType=" + CurrentQueryType + "&EndDate=" + CurrentDate + '&Key2=' + CurrentDeviceId2;
              },
              dataType: "json"
            }
          },
          requestStart: function(e) {
            document.getElementById('errorMsg').innerHTML = '';
          },
          error: function(e) {
            var currentTimeString = GetTimeString();
            document.getElementById('errorMsg').innerHTML = 'Error fetching data at ' + currentTimeString + '! ' + e.status + ': ' + e.errorThrown;
          },
          sort: {
            field: "ReadingDate",
            dir: "asc"
          },
          change: function () {
            $("#chart").data("kendoChart").refresh();
          }
        });
        $("#chart").kendoChart({
          theme: $(document).data("kendoSkin") || "default",
          dataSource: chartDataSource,
          title: { text: "Usage In Days" },
          legend: { position: "top" },
          seriesDefaults: {
            type: "line"
          },
          series:
          [
            { type: "line", field: "kWh",  name: CurrentDeviceName, axis: "WattAxis", color: "#FF9900" },
            { type: "line", field: "kWh2", name: CurrentDeviceName2, axis: "WattAxis", color: "#339900" },
          ],
          categoryAxis: {
            field: "DisplayDate",
            labels: { rotation: -90 }
          },
          valueAxis: [
          {
            name: "WattAxis",
            title: { text: "kWh" },
            min: 0,
            majorUnit: 10,
            color: "#FF9900"
          }],
          tooltip: {
            visible: true,
            format: "{0:N0}"
          },
          legend: {
            position: "bottom"
          }
        });
      }
 $(document).ready(function () {
        setTimeout(function () {
          createChart();
          $("#example").bind("kendo:skinChange", function (e) {
            createChart();
          });
          $("#chart").data("kendoChart").options.title.text = "Energy Usage In Minutes for " + CurrentDeviceName;
        }, 400);
      });
Petur Subev
Telerik team
 answered on 14 Dec 2012
2 answers
229 views
I have a bar chart with an axisLabelClick event defined.  The event fires when the x-axis label is clicked but not when the y-axis is clicked.  This worked in previous versions.  Any help would be appreciated.
Iliana Dyankova
Telerik team
 answered on 14 Dec 2012
1 answer
157 views
Hi, 

Very basic question - Trying to add a simple are chart from example 
http://docs.kendoui.com/howto/add-charts-and-graphs-to-an-application

I am getting the attached error and not able to proceed. I am not sure what all .js files need to be included for the charts. 
Any help is appreciated.

Thanks,
CAS
Hristo Germanov
Telerik team
 answered on 14 Dec 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
Drag and Drop
Application
Map
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
DropDownTree
ListBox
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
Licensing
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
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
TimePicker
FloatingActionButton
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
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?