Telerik Forums
Kendo UI for jQuery Forum
2 answers
440 views
I have a service (ASP.NET WebApi) whose URL returns a single object:

http://localhost:60000/api/approvals/90a11073-cbfe-4442-9330-9b94d83d53a2

But I can't get the datasource to handle the scenario. The request is made and the response is ok but in the change event I don't have any data. the ok from qunit fails.

datasource.bind("change", function (e)
    {
        var element = datasource.get('90a11073-cbfe-4442-9330-9b94d83d53a2')
        ok(element);
        start();
    });

Also inspecting e.sender.data() shows that there are no elements in the result!

Is this supported? How?

Thanks,
Pedro

pedro
Top achievements
Rank 1
 answered on 07 Feb 2013
5 answers
175 views
We are doing some feasibility testing with the kendoui window for our application.  One of the requirements is to be able to have a custom menu (like kendomenu) that will provide interaction on each window instance.  The menu will need to pass requests to the server and update the window content based on the action.  Can you provide us with an example that uses the kendo window custom action click to create an action menu for that window instance?

Also, another requirement is to use an iframe to show google earth maps.  We are experiencing a z-index issue that shows the content over the top of every window (outside the iframe) instance.  Is there a fix for that?  We have tried implementing an iframe shim hack but that doesn't seem to work inside the window.

Thanks for your time.  We are looking forward to using your ui framework our portal application.

Alexander Valchev
Telerik team
 answered on 07 Feb 2013
1 answer
109 views
Can someone please explain me how to use the filter menu widget... What i want do is binding the filtermenu to the choice of  an options( the name of a filterable grid field)of  a select posed outside of the grid.
Alexander Valchev
Telerik team
 answered on 07 Feb 2013
2 answers
137 views
One of my listviews uses a template to populate the content rows:

<
ul data-template="tmpl_jailcard_comments" data-bind="source:jcComments" data-role="listview"> </ul>

When the user displays the same screen for a second time (Click 'Back' and click 'View jail cards' again) changes in the data-model are not reflected. The template works with the original data that it was bound to and ignores any change to the data-model

The following jsfiddle illustrates this: 

http://jsfiddle.net/elgato/EhxUb/13/

Any ideas how to make the listview template reflect an updated data-model?


mg1970
Top achievements
Rank 1
 answered on 07 Feb 2013
6 answers
131 views
It seems that when there's only one XML element, the DropDownList fails to show it, and instead shows 'undefined' five times. Very odd. No errors in the console.

UPDATE: It seems each of the five "undefined" entries in the drop down correspond to the 5 xml elements nested within the doc. So its parsing the doc but failing to map to the schema. If I add the 2nd item (a duplicate), it loads them both fine.
Selvamani
Top achievements
Rank 1
 answered on 07 Feb 2013
1 answer
413 views
Is there a way to use an external kendo template when using the ASP.Net MVC grid helper?


Here's my template:
<script id="javascriptTemplate" type="text/x-kendo-template">
    var isToday = true;
 
    #if(isToday){#
        // show time only e.g. 1:04 PM
    #}else{#
        // show date and time e.g. 02/06/2013 1:04 PM
    #}#
</script>

And I want to use that template in my grid:
@(Html.Kendo().Grid<SiteItem>()
      .Name( "sitesgrid" )
      .Columns( columns =>
                    {
                        columns.Bound( s => s.LastReport ).ClientTemplate( "javascriptTemplate" );
                    }
      )
      .DataSource( ds => ds
                             .Ajax().Read( "SitesGrid", "Dashboard" )
                             .PageSize( 10 )
                             .Sort( sort => sort.Add( p => p.SiteName ) )
      )
      .Pageable( pager => pager
                              .Messages( messages => messages.Display( "{0} - {1} of {2} sites" ) )
      )
      .Filterable()
      .Sortable()
      .Selectable()
      .ColumnMenu()
      .Events( events => events.Change( "onSitesGridSelect" ) )
      .Events( events => events.DataBound( "onGridDatabound" ) )
      )

Is this possible? With the pasted code, it simply outputs the word "javascriptTemplate"


Jayesh Goyani
Top achievements
Rank 2
 answered on 07 Feb 2013
5 answers
155 views
Hello everyone,

I am trying to create a grid with both incell editing and a popup edit window. My grid is in popup mode, and i added a listener on the tables td's to invoke the editCell method. When the grid is in inline mode (or in incell, ofcourse) it has the desired effect of making the cell editable. In popup mode however, nothing happens, field just gets selected and chrome doesnt throw a warning.

Does anyone have any idea how to fix this?

editable: {
    mode: 'popup',
}

$('#grid td').live('dblclick', function (e) {
    $("#grid").data("kendoGrid").editCell($(this));
});
Daniel
Telerik team
 answered on 07 Feb 2013
4 answers
155 views
I have an app that was compiled with PhoneGap for Android. It uses a scrollview to display up to 100 items that include both text and graphics. 

I wrote the code to use xhr to bring the "next" item (page x+1) when you are viewing page x - so performance is pretty good - it generally works well - but when using the app for a while - it sometimes gets "stuck" in the scollview - after displaying the first page of the new "query" result.

I switch content after a preview using the content method - with something like the following:

             $("#adBoard").data("kendoMobileScrollView").content(previewStr); 


             $('#adcounter').text('1');
             $('#totalads').text(cnt);
             $("#adBoard").data("kendoMobileScrollView").scrollTo(0);
              downloadFirst(currRequest, pDiv);

             // switch to the view of the results

I wonder if this is an issue of memory consumption that is not released - when using the content() method. Because - doing the same stuff in Chrome on my development machine - it never gets stuck - with the exact same queries.

The question is - is there possibly a memory issue with this method - and would it be better to dynamically create a new scrollview element and initialize it with the query results after every query?



Petyo
Telerik team
 answered on 07 Feb 2013
1 answer
97 views
I want to use the ImageBrowser with services that perform the requested operations.. I've got my transport.read, transport.create, transport.destroy services created just fine and everything works.

However, the imageUrl and thumbnailUrl properties leave me baffled.


So transport.thumbnailUrl hard-codes a ?path={url} to whatever url you give it ... this seems like a major hack. I WANT to have a REST service and I need to supply additional query string parameters, but this implementation precludes doing so.

At least imageUrl lets me pass in a function or a parameterized string, but imageUrl ALWAYS tacks on the current relative path. I have the images stored in a DB, so doing so just adds needless weight.

Regardless, both these properties should have the same abilities as the create,read, and destroy -- let me control what is passed in explicitly.
Rosen
Telerik team
 answered on 07 Feb 2013
1 answer
176 views
Hello all! thank for this great product.
I use a grid with popup editor for insert and edit grid rows.
in template I use radio button group 

<script type="text/x-kendo-template" id="popup_editor">
    <input id="4" type="radio"  name="Condition" checked=true data-bind="NRDisabled : ChequeNotPassedChange" />
    <input id="5" type="radio"  name="Condition" data-bind="NRDisabled : ChequeReturnedChange" />
    <input id="8" type="radio" name="Condition"  data-bind="NRDisabled : ChequeNaghdiChange" />
</script>
and the properties defined in viewmodel
var viewModel = kendo.observable({
            ChequeNaghdiChange:false,
             ChequeReturnedChange:false
........


the NRDisabled  is used for disable and enable control and its work perfectly out of popup by simple set true or false property 
viewModel.set("ChequeNaghdiChange",false);
 kendo.data.binders.NRDisabled = kendo.data.Binder.extend({

        refresh: function () {
            if (this.bindings.NRDisabled.get()) {
                this.element.setAttribute("disabled", "disabled");
            } else {
                this.element.removeAttribute("disabled");
            }
        }
    });

It's seems property binding have some problem in kendo.
Best Regards
Amir
Daniel
Telerik team
 answered on 07 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?