Telerik Forums
Kendo UI for jQuery Forum
1 answer
48 views
Hi,

I have a scheduler that is configured to allow selection.  Rather than showing the default edit pop-up that is triggered by hitting [enter] we have wired up a custom dialog that appears as soon as the user releases the mouse after making a selection.

When the standard dialog opens, I can see it creates a temporary event on the scheduler for the selected date-range and that event is removed and the selected range reinstated if the user cancels the dialog.

I have been able to generate and remove the temporary event with my custom dialog but not found a way to reinstate the selection.  Is there an API for this that I have missed?

Thanks
Vladimir Iliev
Telerik team
 answered on 10 Feb 2014
7 answers
170 views
Hi,

I am currently using a combination of:
selectable: "multiple, cell",
edit: function (e) {
  if (e.model[e.field].readOnly) {
    this.closeCell();
  }
}
edit function comes from http://www.telerik.com/forums/how-to-make-cell-editable-based-on-value-of-another-cell-in-grid

This allows me to make individual cells read only, which is working great.
My problem occurs as I have logic that is bound to the grid that requires it to be focussed after a select.
Current behaviour that I see is:
1) If selecting >= 2 cells either horizontally or vertically the edit event is not fired and the grid has focus - Correct
2) If selecting a single cell that is not read only the editor is displayed and has focus - Correct
3) If selecting a single cell that is read only the editor is not displayed, but the grid has lost focus. - Incorrect

It appears that the activeElement is being reset to the document body by the this.closeCell(); even though the editor is never displayed.

Is their some way I can either prevent the edit without using closeCell() or "fix" the loss of focus after calling closeCell().
I have tried adding a this.focus(); after closeCell() but the grid still doesn't get focus.

Thanks
Euan

Euan
Top achievements
Rank 1
 answered on 10 Feb 2014
1 answer
50 views
It seems like clicks on the close cross (upper right corner) of a calendarevent will propagate to the rest of the DOM.
Maybe I am just doing something incorrectly.

Is it an intended behavior?
100%
Top achievements
Rank 1
 answered on 10 Feb 2014
4 answers
158 views
Hello,

We have a responsive web design targeting with first. I am currently using the bootstrap 3 carousel control for images, however, we would like to move to the Kendo Mobile ScrollView to use the swipe actions when on mobile.

I have been trying to integrate the mobile ScrollView into the page using MVC wrappers without luck. I'm not looking for syntax help, I just need to know if it can be done, if so, a sample would be great.

I'm fairly new to the Kendo widgets, I noticed there is no MVC wrapper demo for databinding the mobile scrollview? I was hoping to use that as my starting point to learn the syntax. 

I have been messing with this in all sorts of configurations trying to get it to work unsuccessfully, I think I'm missing some core guidance.
Thank you.

My script bundle:
bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
            "~/Scripts/kendo/kendo.all.min.js",
            "~/Scripts/kendo/kendo.mobile.min.js",
            "~/Scripts/kendo/kendo.aspnetmvc.min.js"));

My style bundle:
bundles.Add(new StyleBundle("~/Content/kendo/css").Include(
            "~/Content/kendo/kendo.mobile.all.min.css",
            "~/Content/kendo/kendo.common-bootstrap.min.css",
            "~/Content/kendo/kendo.bootstrap.min.css"));


My layout page:
@Styles.Render("~/Content/css")
@Styles.Render("~/Content/kendo/css")
 
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@Scripts.Render("~/bundles/kendo")

On my view page:
<div class="row">
    <div class="col-xs-12 col-lg-8 col-centered" style="max-width:600px;">
        <div data-role="view">
            @(Html.Kendo().MobileScrollView()
            .Name("adRotator")
                .DataSource(ds => ds.Read("GetAdRotatorImages", "Ads", new{id = Model.AdId}))
            )
        </div>
    </div>
</div>

And I have tried with and without this at the bottom of the page:
<script>
    var app = new kendo.mobile.Application();
</script>


Thank you,
Richard
Kiril Nikolov
Telerik team
 answered on 10 Feb 2014
1 answer
43 views
Hi,

sorry for my poor English.

I'm trying to tranlstate the text of buttons update and cancel in inline edit mode without success.

Could you show me an example of good way to do this ?

thank you
Dimiter Madjarov
Telerik team
 answered on 10 Feb 2014
3 answers
319 views
Is there a way to get at the original data from a data source once it has been fetched from the server? I need to look at which fields were defined in the actual data payload and can't do it until after the data has been sent over. Doing this in the schema parse event won't work for my needs.
Alexander Valchev
Telerik team
 answered on 10 Feb 2014
5 answers
148 views
Why can't a Layout take a viewModel like a View? Something like this:

<div data-role="layout" data-id="service" data-init="init" data-model="viewModel"></div>

As a workaround, I am doing this the following. Is there any reason that I shouldn't be doing this?

<div data-role="layout" data-id="service" data-init="init" data-show="show"></div>

function show() {
  kendo.bind($("service-layout-selector-here"), viewModel);
}
Petyo
Telerik team
 answered on 10 Feb 2014
1 answer
73 views
So far I have managed to load data from url and show on list, but once my list ends,
I need to load data from next url .Here is my code:

var i = 0, pageSize = 10;<br>
function mobileListViewEndlessScrolling() {<br>
var dataSource = new kendo.data.DataSource({<br>
type: "odata",<br>
transport : {<br>
read: {<br>
type : "GET",<br>
url : "https://graph.facebook.com/siedae/feed?access_token=150129068491462|a8HxcqfRA-Bn1M59A_wefbEMs9c",<br>
contentType: "application/json; charset=utf-8",<br>
dataType : "json",<br>
error : function (xhr, ajaxOptions, thrownError) {<br>
alert("error " + xhr.responseText);<br>
},<br>
}<br>
},<br>
serverPaging: true,<br>
pageSize: pageSize,<br>
schema: {<br>
data : "data",<br>
total: function() { return 25; }<br>
},<br>
});<br>
$("#endless-scrolling").kendoMobileListView({<br>
dataSource: dataSource,<br>
template: $("#endless-scrolling-template").text(),<br>
endlessScroll: true,<br>
scrollTreshold: 30 ,<br>
}); <br>
}<br>
Kiril Nikolov
Telerik team
 answered on 10 Feb 2014
3 answers
377 views


 Here is my html for the my list view:

<ul id="best-in-klas-products-list-view"></ul>

I have the following Header Template:

<script id="best-in-klas-products-header-template" type="text/x-kendo-template">
    # if ( klas.bestInKlasProductsViewModel.checkForBestInKlas(value) ) { #
        <div class="list-view-group-header">
            <div class="group-header-table-container">
              <div><img src="images/best-in-klas.svg" class="best-in-class-logo" /></div>
             <div>
                 <div class="market-segment-title">#: klas.marketSegmentName #</div>
                 <div class="award-title">Best in KLAS</div>
            </div>
        </div>
     </div>
   # } else { #
     <div class="list-view-group-header">
        <div class="group-header-table-container">
            <div><img src="images/category-leader.svg" class="best-in-class-logo" /></div>
           <div>
              <div class="market-segment-title">#: klas.marketSegmentName #</div>
              <div class="award-title">Category Leaders</div>
          </div>
       </div>
    </div>
  # } #
</script>  


This is my script for the list view:

$('#best-in-klas-products-list-view').kendoMobileListView({
    headerTemplate: $('#best-in-klas-products-header-template').text(),
    template: $('#best-in-klas-products-template').text(),
    dataSource: new kendo.data.DataSource({
        type: 'json',
        transport: {
        read: url
    },
    group: {
        field: 'groupByField', dir: "desc"
    },
    sort: [
        { field: "ranking", dir: "asc" }
    ]}),
    filterable: false,
    click: function (e) {
        ...
    }
});


The Code is simple clean, I Love it. My problem is that I need to display additional in my header template. We have additional award categories I need to display additional information in the header template. What's the best way to accomplish this? Any help would be greatly appreciated. 









Kiril Nikolov
Telerik team
 answered on 10 Feb 2014
3 answers
84 views
when you click on the section2, the whole HTML layout is blown apart. the actual behaviour on the page with splitter is quite worse.
this only happens when 
  <div id="orgSchlDgExmSchdl" style="min-height:400px;"></div>
and it is not instantiates/initialized into actual grid object, the proble also does not occur when div tag is initialized into grid object.

<head>
<script type="text/javascript">
        $(document).ready(function () {
            //collapsible management
            $("#panelbar").kendoPanelBar({
                //expandMode: "single"
            });
        });
    </script>


</head>
<body>
    <ul id="panelbar">
        <li class="k-state-active">
            <span> Section1 </span>
            <div>
                Elements under section one
            </div>
        </li>
        <li>
            <!--<span>Section 2</span>
            <div> Elements under section2</div>-->
            <span>Data Entry Grid</span>
            <div id="orgSchlDgExmSchdl" style="min-height:400px;"></div>
        </li>
    </ul> <!-- end Panelbar-->
  
                          
</body>
</html>
Kamen Bundev
Telerik team
 answered on 10 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?