Telerik Forums
Kendo UI for jQuery Forum
10 answers
425 views
Just wondering if the Grid widget will have search filtering integrated into it for the official release?
Danny
Top achievements
Rank 1
 answered on 03 Aug 2012
3 answers
112 views
Is there any way I can override the silver ipad look and feel with the blue iphone theme? 

I am building a very large application for several devices, and depending on the device, I may execute different logic. Having said this, I am trying to avoid doing this by passing platform as a parameter in kendo.mobile.Application because I fear that it may have some side effects on the platform-specific logic I have implemented. 

Are there some classes that can be inherited by my navbars/buttons/other elements to achieve this? 
Kamen Bundev
Telerik team
 answered on 03 Aug 2012
1 answer
173 views
I would like to pass the filter and sort criteria to an action using a toolbar custom command. Ultimately, I'd like to export a CSV or Excel file. What is the best way to go about this?

I first tried the following, but it did not work.

The view
@(Html.Kendo().Grid<KendoGridApplication.Models.Order>()
      .Name("Grid")
      .ToolBar(o => o.Custom().Action("Export", "Home").Name("Export"))
      ...

The controller
public ActionResult Export([DataSourceRequest] DataSourceRequest request)
{
  // request.Filters is null
  // request.Sorts is null
Petur Subev
Telerik team
 answered on 03 Aug 2012
0 answers
169 views
Hi Guys, Im trying to refactor my javascript to fit the Revealing Module Pattern, but am coming up with a few issues. To start with following is my viewModel function:

/***********************************/
function Contacts_Details_ViewModel(SelectedContactID) {  
    var self = this;
    var selectedContact;
    var selectedContactID = SelectedContactID;
    var contacts_Details_DataSource = new kendo.data.DataSource({
        transport: {
            read: {
                url: $('#urlLink').data('url') + '?tenantID=1&dataType=Contacts_Details',
                dataType: "json",
                data: {
                    actionName: function () {                        
                        return selectedContactID;
                    }
                }
            },
            update: {
                url: $('#urlLink').data('url') + '/SaveChanges?tenantID=1&actionName=Contacts_Details',
                dataType: "json",
                type: "POST",
                contentType: "application/json; charset=utf-8"
            },
            parameterMap: function (options, operation) {
                if (operation !== "read" && options.models) {
                    return JSON.stringify(options.models);
                }
                return options;
            }
        },
        batch: true, 
        change: function () {
            selectedContact = this.view()[0];                        
        },
        schema: {
            model: {
                id: "ContactID"
       }
        }
    });
    contacts_Details_DataSource.read();
    var goToContactsListing = function () {        
        this.selectedContactID = null;
        location.hash = ''
    }

    var change = function () {
        hasChanges = true;        
    }

    var hasChanges = false;

    var saveChanges = function () {
        contacts_Details_DataSource.sync();
        hasChanges = false;        
    }

    return {
        contacts_Details_DataSource: contacts_Details_DataSource,
        selectedContact: selectedContact,
        goToContactsListing: goToContactsListing,
        change: change,
        hasChanges: hasChanges,
        saveChanges: saveChanges
    };
}
/***********************************/ 

Than I have the following to initialize the Contacts View Model:

/***********************************/ 
$(document).ready(function () {
    var contacts_Details_ViewModel = kendo.observable(new Contacts_Details_ViewModel(1));
    kendo.bind($("#ContactsDetails"), contacts_Details_ViewModel);
});
/***********************************/  

Than I have the following html on the page that binds to the view model
/***********************************/  
<div id="ContactsDetails" >
    <ul>
            <li><label>ID</label> <span data-bind="text:selectedContact.ContactID, events: { change: change }"></span></li>
            <li><label>Name</label> <input type="text" class="k-textbox" data-bind="value: selectedContact.FirstName, events: { change: change }" /></li>
            <li><label>UnitPrice</label> <input type="text" class="k-textbox" data-bind="value: selectedContact.LastName, events: { change: change }" /></li>
        </ul>
        <button data-bind="click: goToContactsListing">Back to Listing</button>
         <button data-bind="click: saveChanges, enabled: hasChanges">Save Changes</button>
</div>
/***********************************/  

My problem is nothing ever shows up in the SelectedContact fields (ID label and firstname lastname textboxes), they are always blank. Everything else seems to be bound correctly (events and simple strings work fine) but just not the selectedContact.

Any ideas on where Im going wrong? Im thinking whether it is how I set the selectedContact var in the change event of the datasource, im not confident that its being set there correctly.

Please help I've waisted a day trying to get this to work, so ive got to tap out for my own sanity.

Thanks in advance




Matt
Top achievements
Rank 1
 asked on 03 Aug 2012
5 answers
808 views
Hi,
I want to have a input text box with search enabled just like the type='search' input box available in the jquerymobile.
i.e. No need to have the search button next to it, but it turns the iPhone return button into the search button.

http://jquerymobile.com/demos/1.1.0/docs/forms/search/index.html 

Would it be possible to do this in Kendo Mobile view?

alternatively, I wouldn't mind using the jquerymobile directly in my Kendo Mobile view if possible(I tried this ,, <input type='search' /> and didn't work. 

Any help would be much appreciated,

Regards,

JOhn C
Joon
Top achievements
Rank 1
 answered on 03 Aug 2012
2 answers
118 views
Hi,

Is there a method available to smooth the pointer's transition between values in a radial gauge?

For example, if I set the value to 0 and then click to change the value to 100, the needle seems to very quickly (almost instantly) jump to the 100 position. This results in a unrealistic gauge. Is there a way to slow the animation?

I have tried the suggestion seen in another thread here, but it seemed to have no effect:

        animation: {
            duration: 10 // milliseconds that the animation will take to play
        } 

Thanks.
Dave
Top achievements
Rank 1
 answered on 03 Aug 2012
0 answers
165 views
Hi
Using the TabStrip UI element in our ASP.NET MVC 3 application using the Razor engine and binding the control to an IEnumerable<T> we noticed the following behaviour.
  • Using a FOR loop on the IEnumerable<T> to generate the Tab Items (Tab pages) works fine
  • But setting the Tab Item Content within the same loop for some reason causes some kind of a deferred execution, the contents seem to be set after the tab pages are created (which I assume is related to the load-on-demand feature of the tabstrip)
  • The problem is, the iteration seem to be using the last element in the model to set the content of all the tab pages.

Here is the sample code, could you please direct to the mistake in it or the right method using razor to acheive the same.

@model IEnumerable<KendoMVCExample.Models.CustomerAddress>
...
@(Html.Kendo().TabStrip()
    .Name("CustomerAddressTabStrip")
    .Items(items =>
    {
        foreach (var customer in Model)
        {
            items.Add()
            .Content(@<text> @RenderTableContent(customer) </text>)//<----this fails {last address is repeated on all} 
            .Text(customer.CustomerName); //<----this works fine 
        }        
    }).SelectedIndex(0)
    )
 
     @helper RenderTableContent(KendoMVCExample.Models.CustomerAddress customer)
         {
          <table>
             <tr>
                 <td>
                     @customer.AddressLine1<br />
                     @customer.AddressLine2<br />
                     @customer.AddressLine3<br />
                 </td>
             </tr>
         </table>
    }
Prabhat
Top achievements
Rank 1
 asked on 03 Aug 2012
0 answers
118 views
In editor, How Do I Add A Background Image To My TextArea? How to change backgroundcolor of a textarea?

this way don't work: 
<textarea id="editor" rows="10" cols="30" style="width:710px; height:750px; background-image:url(layout.jpg); background-repeat:no-repeat;">
</textarea>
Eduardo
Top achievements
Rank 1
 asked on 03 Aug 2012
5 answers
185 views
http://demos.kendoui.com/calendar/template.html

I began implementing a variation on the demo example using almost an identical array of dates. I noticed that all my dates were adding the template a month ahead of the date I configured. But, then I went back and looked back at the example and noticed that it's doing the same there.

Here's my code (also added a screen shot of the month the dates are rendering):

var assignments = [
        +new Date(2011, 12, 6),
        +new Date(2011, 11, 27),
        +new Date(2011, 11, 24),
        +new Date(2011, 11, 16),
        +new Date(2011, 11, 11)
];
 
$("#calendar").kendoCalendar({
    value: new Date(),
    month: {
        // template for dates in month view
        content: '# if ($.inArray(+data.date, [' + assignments + ']) != -1) { #' +
            '<div class="assignment"></div>' +
            '# } #' +
            '#= data.value #'
    },
    change: onCalendarChange,
    footer: "Today - #=kendo.toString(data, 'd') #"
});
Jelena
Top achievements
Rank 1
 answered on 02 Aug 2012
1 answer
198 views
I have a kendoGrid to display fields as text boxes and I would like to use validation on the input text boxes using kendoValidator.
I would expect to see a message against each text box but only one validation message is reused for each cell.
How do we use the kendoValidator within kendoGrid that uses a row template and generates input tags for each fields.
I have attached a sample file with a grid and validation within it.
Suresh
Top achievements
Rank 1
 answered on 02 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?