Telerik Forums
Kendo UI for jQuery Forum
7 answers
755 views
Hi.

I'm trying to use the Splitter in a div contained within a TabStrip.

I'm guessing it's because the div is not visible at the point when I call

$('#x-splitter ').kendoSplitter();

but when the splitter is eventually displayed (i.e. when the tab is selected) the first pane is 0-width. As soon as the window is resized it jumps to the correct size.

Is there any way I can tell the splitter to refresh when it's first displayed?

Any help much appreciated!

Mark
Nathan
Top achievements
Rank 2
 answered on 14 Feb 2014
10 answers
161 views
Here is my configuration in the View using html helpers and I have attached a picture of how it looks like:

@(Html.Kendo().Grid<Merchant_List_Updater_MVC.Controllers.AreaObject>()
               .Name("Grid")
               .Columns(columns =>
               {
                            columns.Bound(x => x.name).Title("Region Name");
                            columns.Bound(p => p.locationList).Title("Locations Included");
                            //Once clicked it searches and invokes a function in the script named "EditButtonClicked".
                            columns.Command(command => command.Custom("Modify")
                                                              .Click("ModifyButtonClicked"))
                                                                                          .HeaderHtmlAttributes(new {style = "width:80px;"})
                                                                                          .Width("105px");
                            //Once clicked it searches and invokes a function in the script named "DeleteButtonClicked".
                            columns.Command(command => command.Custom("Remove")
                                                              .Click("DeleteButtonClicked"))
                                                                                          .HeaderHtmlAttributes(new {style = "width:80px;"})
                                                                                          .Width("105px");
               })
               .Pageable(pageable => pageable.PreviousNext(true).ButtonCount(5))
               .Sortable(sortable => sortable.Enabled(true))
               .Scrollable(scr => scr.Height("auto"))
               .DataSource(dataSource => dataSource
                                         .Ajax()
                                         .Read(read => read.Action("AreaJsonDataSourceOrder", "ModifyOptions"))
                                         .PageSize(15))
               .Resizable(resize => resize.Columns(true))
               .Reorderable(reorder => reorder.Columns(true))
               .Selectable(selectable => selectable.Mode(GridSelectionMode.Single))        
      )
Jack
Top achievements
Rank 1
 answered on 14 Feb 2014
1 answer
944 views
I tried to iterate through the list and display all elements in the list into a cell in a column but I've having trouble getting it to work.
Here is what I have so far.

In Grid definition:
columns.Bound(x => x.locationList).Title("Locations Included").ClientTemplate("#= iterate(x.locationList) #");

where x.locationList is a List<string> in the object passed in.

In <script>:
function iterate(object) {
var html = "<ul>";

for (var x = 0; x < object.length; x++) {
html += "<li>";
html += object[x];
html += "</li>";
}

html += "</ul>";
return html;
}

However, this causes all the records to disappear. What is the correct syntax to do this?
Jack
Top achievements
Rank 1
 answered on 14 Feb 2014
9 answers
620 views
I tested out JSON initialization from DataSource inline, which worked for me.
But now I am preparing to do this from a remote source, so I made a static copy of  the JSON and put it in a file.

(NOTE: what this is creating is a PanelBar which when opened allows one to check off different file types. When the user presses SEARCH button, I will find out which file types have been checked off. If you know a better way to do this, tell me).

I would create a JSFiddle, but I don't know how to simulate reading a JSFIDDLE JSON file.

This is not working for me:

$("#creatorSelect").kendoPanelBar({
    dataSource: {
    type: 'json',
        transport: {
        read: './menu.JSON'
        }
    }
});

And here is the menu.JSON file:

[{
    "text":"File Types",
    "items":[
        {
            "text":"<input type='checkbox' value='fileType'> JPG</input>",
            "encoded":false
        },
        {
            "text":"<input type='checkbox' value='fileType'> CADRG</input>",
            "encoded":false
        }
    ]
}]


When I put everything in-line this works fine:

   $("#creatorSelect").kendoPanelBar({
        dataSource:[{
    text:"File Types",
    items:[
        {
            text:"<input type='checkbox' value='type'> JPG</input>",
            encoded:false
        },
        {
            text:"<input type='checkbox' value='type'> CADRG</input>",
            encoded:false
        }
    ]
}]);
Kiril Nikolov
Telerik team
 answered on 14 Feb 2014
1 answer
126 views
Hello,

I have an issue with a line chart with 310px width which hide a part of last label (http://jsbin.com/zuqiz/9/edit):

var stats=[        
          {'date':"2013-12-01",'value':1},
          {'date':"2013-12-02",'value':12},
          {'date':"2013-12-03",'value':13},
          {'date':"2013-12-04",'value':14},
          {'date':"2013-12-05",'value':14},
          {'date':"2013-12-06",'value':14},
          {'date':"2013-12-07",'value':14},
          {'date':"2013-12-08",'value':14},
          {'date':"2013-12-09",'value':14},
          {'date':"2013-12-10",'value':14},
          {'date':"2013-12-11",'value':14},
          {'date':"2013-12-12",'value':14},
          {'date':"2013-12-13",'value':14},
          {'date':"2013-12-14",'value':14},
          {'date':"2013-12-15",'value':14},
          {'date':"2013-12-16",'value':14},
          {'date':"2013-12-17",'value':14},
          {'date':"2013-12-18",'value':14},
          {'date':"2013-12-19",'value':14},
          {'date':"2013-12-20",'value':14},
          {'date':"2013-12-21",'value':14},
          {'date':"2013-12-22",'value':14},
          {'date':"2013-12-23",'value':14},
          {'date':"2013-12-24",'value':14},
          {'date':"2013-12-25",'value':14},
          {'date':"2013-12-26",'value':14},
          {'date':"2013-12-27",'value':14},
          {'date':"2013-12-28",'value':14},
          {'date':"2013-12-29",'value':14},
          {'date':"2013-12-30",'value':14},
          {'date':"2013-12-31",'value':14}
    
            ];
 

function createChart() {
$("#chart").kendoChart({
    title: {
        text: "test"
    },
   dataSource: {
          data: stats
                        },
    series: [{
        type: "line",
         field: "value"
                  
    }],
    categoryAxis: {
        field: "date",
        type: "Date",
        labels: {format: "M/d",step:6}
    }

    }
);

$(document).ready(createChart);


Same issue with step:10.


Iliana Dyankova
Telerik team
 answered on 14 Feb 2014
2 answers
91 views
As far as I have seen the resize event of the splitter happens even while the page itself is loading which by itself I understand why.

The problem for me is I want to make a post ajax call to save the splitter size and I want to minimize the calls to resize events the application user triggers while resizing the pane with the mouse only.

How would one go about that since I've noticed the layoutChange event is getting deprecated soon and I don't want to rely on something that's not going to be there in a next revision :)
Dimo
Telerik team
 answered on 14 Feb 2014
1 answer
70 views
Can I change the first row from days to technical's names?
I need to show the technical's appointments by day and hours in the left side as default.
Similar to ScheduleView from Silverlight (http://demos.telerik.com/silverlight/#ScheduleView/FirstLook). Where my technical's names would be Channels TV in this example.

Is it possible? How can i do it?
Alexander Popov
Telerik team
 answered on 14 Feb 2014
7 answers
429 views
Hi,

I have a view with a canvas on it and a drawing. I would like to change the size on the canvas and redraw the contents when the device orientation event triggers.

So if in Portrait I would like to redraw in Landscape and vice versa.

How do I link the  device orientation change to the current view so that I can resize the canvas and redraw the contents ?

cheers
Tony
Kiril Nikolov
Telerik team
 answered on 14 Feb 2014
1 answer
286 views
Hi Georgi,you are right, using the text method is not the right way.

On the other side, there is something wrong with cascading comboboxes in Kendo UI.

Please look at my attached sample (click on ComboBox in top menu).
[ComboBox.zip]

The ViewModel I'm using:

public class ComboBoxViewModel
{
    public string MyProperty1 { get; set; }
    public string MyProperty2 { get; set; }
    public Product Product { get; set; }
    public int ProductID { get; set; }
}


In the view I'm using two comboboxes. One for products

  <div class="form-group">
      @Html.LabelFor(model => model.ProductID, new { @class = "control-label col-md-2" })
      <div class="col-md-10">
          @(Html.Kendo().ComboBoxFor(model => model.ProductID)
.CascadeFrom(Html.IdFor(model => model.Product.Category).ToString())
            .Placeholder("Select state or province...")
            .DataTextField("ProductName")
            .DataValueField("ProductID")
            .Filter(FilterType.Contains)
            .DataSource(source =>
            {
                source.Read(read =>
                {
                    read.Action("GetCascadeProducts", "ComboBox")
                        .Data("filterProducts");
                }).ServerFiltering(true);
                ;
            })
            .AutoBind(false)
            .HighlightFirst(true)
            .Enable(false)
          )
          @Html.ValidationMessageFor(model => model.ProductID)
          <script>
              function filterProducts() {
                  return {
                      categories: $("#@Html.IdFor(model => model.Product.Category.CategoryID).ToString()").val(),
                      productFilter: $("#@Html.IdFor(model => model.ProductID)").data("kendoComboBox").input.val()
                  };
              }
          </script>
      </div>
  </div>


and one for category (as a filter for products)

<div class="form-group">
            @Html.LabelFor(model => model.Product.Category, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @(Html.Kendo().ComboBoxFor(model => model.Product.Category.CategoryID)
                  .Name(Html.NameFor(model => model.Product.Category).ToString())
                  .Placeholder("Select category ...")
                  .DataTextField("CategoryName")
                  .DataValueField("CategoryID")
                  .Filter(FilterType.Contains)
                  .DataSource(source =>
                  {
                      source.Read(read =>
                      {
                          read.Action("GetCascadeCategories", "ComboBox").Type(HttpVerbs.Post);
                      });
                  })
                )
            </div>
        </div>


My problem is, that the product combobox is empty on initial page load, because the parameter productFilter is not empty. It is set with the value of  ProductID, and therefore the returned product list must be empty!

<script>
    function filterProducts() {
        return {
            categories: $("#@Html.IdFor(model => model.Product.Category.CategoryID).ToString()").val(),
            productFilter: $("#@Html.IdFor(model => model.ProductID)").data("kendoComboBox").input.val()
        };
    }
</script>


My feeling is, that there must be something wrong here with Kendo ComboBoxes.

How can I solve this scenario?
The ComboBox with products should be filled with all products of category Beverages and show "Chai" as a selected product on initial load. (See Scree2.png)

Telerik support provide me with a solution (see Telerik.zip) that doesn't work for me.

Regards,
Daniel

You can find all my files here: http://1drv.ms/1cDgIZZ

Georgi Krustev
Telerik team
 answered on 14 Feb 2014
3 answers
302 views
I've noticed that while at first the android back button (as on an android device) and the kendo mobile back button appear to work the same way, when you use a combination of both you get different behaviour. Let's see how I go at explaining what I mean...

I have 3 views; view-a, view-b and view-c. I start the application and the initial view is view-a, then I do the following tests:

Android back button only
  1. navigate to view-b
  2. navigate to view-c
  3. use the android back button - takes me to view-b
  4. navigate to view-c
  5. use the android back button - takes me to view-b
  6. use the android back button - takes me to view-a
Kendo back button only
  1. navigate to view-b
  2. navigate to view-c
  3. use the kendo back button - takes me to view-b
  4. navigate to view-c
  5. use the kendo back button - takes me to view-b
  6. use the kendo back button - takes me to view-a
Both the kendo and android back buttons
  1. navigate to view-b
  2. navigate to view-c
  3. use the kendo back button - takes me to view-b
  4. navigate to view-c
  5. use the kendo back button - takes me to view-b
  6. use the android back button - takes me to view-c
  7. use the android back button - takes me to view-b
  8. use the android back button - takes me to view-c
  9. use the android back button - takes me to view-b
  10. use the android back button - takes me to view-a
Notice the extra steps when using first the kendo back button and then the android back button? FYI, the same happens when using android first and then kendo. Ideally what would happen is the same behaviour as in the first 2 scenarios.

Why would I want both back buttons available you ask? Well I've implemented a swipe gesture that fires navigate("#:back") for convenience because reaching for the back button on a tablet can be a stretch.

So, any ideas? Is this something that would need to be fixed/developed in kendo mobile or is there something I can do?
Petyo
Telerik team
 answered on 14 Feb 2014
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
Dialog
Chat
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
Switch
BulletChart
Licensing
QRCode
ResponsivePanel
TextArea
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
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?