Telerik Forums
Kendo UI for jQuery Forum
2 answers
109 views
Hi,

I've got an application that calls application.navigate.
When you move from view1 to view2, the tabstrip updates, however going back the other way causes the tabstrip to go out of sync.
Here's some sample code to illustrate the behaviour:

<!DOCTYPE html>
<head>
    <meta charset="utf-8"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta name="viewport"
          content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, target-densitydpi=medium-dpi"/>
 
    <link rel="stylesheet" href="styles/926/kendo.mobile.all.min.css"/>
    <script src="js/jquery.min.js"></script>
    <script src="js/kendo/926/kendo.mobile.min.js"></script>
 
</head>
 
<body id="dmbody">
<script type="text/javascript">
    var application = new kendo.mobile.Application($(document).body,
                    {
                        transition: "slide",
                        skin: "flat"
                    });
    function navToView2() {
        //performs all sorts of logic, but boils down to calling application.navigate to some URL
        application.navigate('#view2');
    }
    function navToView1() {
        //performs all sorts of logic, but boils down to calling application.navigate to some URL
        application.navigate('#view1');
    }
</script>
 
<!-- initial view -->
<div data-role="view" data-layout="app" data-title="View 1" id="view1">
    <p>
        <a data-role="button" data-click="navToView2">View 2</a>
    </p>
</div>
 
<div data-role="view" data-layout="app" data-title="View 2" id="view2">
    <p>
        <a data-role="button" data-click="navToView1">View 1</a>
    </p>
</div>
 
<!-- application layout template -->
<div data-role="layout" data-id="app">
    <header data-role="header">
        <div data-role="navbar">
            <span data-role="view-title"></span>
        </div>
    </header>
    <div data-role="footer">
        <div data-role="tabstrip" >
            <a href="#view1">View 1</a>
            <a href="#view2">View 2</a>
        </div>
    </div>
</div>
 
 
</body>
</html>

Kendo UI Mobile build: 926
Browser: Chrome 30

Any idea why this happens?

Thanks.
Robin
Top achievements
Rank 1
 answered on 14 Oct 2013
1 answer
63 views
Hello,

We are getting an error in IE8 with the latest internal build with the numeric textbox.  We're using the kendo.all.js file and have narrowed it down to a particular line causing the problem.  Just wanted to make sure you were aware of this, if you haven't already fixed it.  The error is on line 36783:
element.setAttribute("type", "text");

The error is "this command is not supported."  Hope that helps.  Thanks!

Regards,
Brian
Georgi Krustev
Telerik team
 answered on 14 Oct 2013
1 answer
86 views
Hi ,  I`m using Kendo hierarchy grid to my web page. When page loading my hierarchy grid id working properly.
 But in here I use a button to rebind grid data.
After re bond data, Its shows all parent rows. But my child grids are not showing when click the parent row. There is an error called "data is undefined".
I attached my aspx web page to here..

Please help me....
Vladimir Iliev
Telerik team
 answered on 14 Oct 2013
3 answers
480 views
I have this Kendo UI multiselect:

@(Html.Kendo().MultiSelect()
      .Name("EditModel.Modules.ID")
      .DataValueField("ID")
      .DataTextField("Name")
      .Filter(FilterType.Contains)
      .DataSource(source =>
      {
        source.Read(read =>
                    {
                    read.Action("GetModules", "Modules");
                    })
                   .ServerFiltering(true);
                    }))

How can I add [index] to name so the array maps to the array in my editmodel?

Is there some setting that would add [x] automatically to the name?

/Lasse
Atanas Korchev
Telerik team
 answered on 14 Oct 2013
1 answer
241 views
I can't make the scheduler to read the data I created SchedulerTaskService here I put some of the code:

public class SchedulerTaskService : ISchedulerEventService<TaskViewModel>
{

public SchedulerTaskService()
{

}

public virtual IQueryable<TaskViewModel> GetAll()
{

List<TaskViewModel> lista = new List<TaskViewModel>();

TaskViewModel node = new TaskViewModel();

node.TaskID = 1;
node.Description = "Hello";
node.Ficha_Num = "126293860";
node.Medico = "JGO1230";
node.Title = "JOHNNY GONZALEZ SOTO";
node.Start = new DateTime(2013,10,13,9,0,0);
node.End = new DateTime(2013, 10, 13, 9, 15, 0);
node.Telefono = "2719944";
node.StartTimezone = "Etc/UTC";
node.EndTimezone = "Etc/UTC";
node.OwnerID = 1;

lista.Add(node);

return lista.AsQueryable();
}
____________________________________________________________________

public partial class SchedulerController : Controller
{
private SchedulerTaskService taskService;


public SchedulerController()
{
this.taskService = new SchedulerTaskService();
}

public ActionResult Index()
{
return View();
}

public virtual JsonResult Read([DataSourceRequest] DataSourceRequest request)
{
return Json(taskService.GetAll().ToDataSourceResult(request));
}
______________________________________________________________________________________

@(Html.Kendo().Scheduler<TaskViewModel>()
.Name("scheduler")
.Date(DateTime.Today)
.StartTime(new DateTime(2013, 1, 1, 7, 00, 00))
.EndTime(new DateTime(2013, 1, 1, 18, 00, 00))
.Height(500)
.MinorTickCount(1)
.MajorTick(15)
.Selectable(true)
 

.Editable(e => e.TemplateId("editor"))

.Views(views =>
{
views.DayView();
views.WeekView(weekView => weekView.Selected(true));
views.MonthView();
views.AgendaView();

 })

.Messages(message =>
{
message.Today("Hoy Día");
message.AllDay("Todo el Día");
message.Save("Reservar");
message.Cancel("Cerrar");
message.Views(views =>
{
views.Day("Diario");
views.Month("Mensual");
views.Week("Semanal");


});

message.ShowWorkDay("Mostrar Todo el Día");
message.ShowFullDay("Mostrar Horario");


message.Editor(Editor =>
{
Editor.EditorTitle("Cita");

});


})

.Timezone("Etc/UTC")

.DataSource(d => d
.Model(m =>
{
m.Id(f => f.TaskID);
//m.Field(f => f.OwnerID).DefaultValue(1);
})


.Read("Read", "Scheduler")
.Create("Create", "Scheduler")
.Destroy("Destroy", "Scheduler")
.Update("Update", "Scheduler")
//.Filter(filters =>
//{
// filters.Add(model => model.OwnerID).IsEqualTo(1).Or().IsEqualTo(2);
//})
)

)
____________________________________________________________________

<script id="editor" type="text/x-kendo-template">

<table border="0">
<tr style="border-style:hidden">
<td style="border-style:hidden"><label>Paciente</label></td>
<td style="border-style:hidden"><input style="width:300px;" data-bind="value: Title" /> <button class="k-button" data-bind="value: buscar_ficha">Buscar</button></td>
</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Teléfono</td>
<td style="border-style:hidden"><input data-bind="value: Telefono"/></td>
</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Comienza</td>
<td style="border-style:hidden"><input data-role="datetimepicker" data-bind="value: start" /></td>

</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Finaliza</td>
<td style="border-style:hidden"><input data-role="datetimepicker" data-bind="value: end" /></td>
</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Médico</td>
<td style="border-style:hidden"><input data-bind="value: Medico"/></td>
</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Ficha</td>
<td style="border-style:hidden"><input data-bind="value: Ficha_Num"/></td>
</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Memo</td>
<td style="border-style:hidden"><input style="width:300px;" data-bind="value: Description"/></td>
</tr>
</table>

</script>


any help would be appreciated

Johnny
Rosen
Telerik team
 answered on 14 Oct 2013
3 answers
121 views
Hi,
I'm testing both devexpress and telerik MVC components to decide which one is more suitable for my company needs.
we need to implement a filter on a column with multiple selection. I couldnt find a way to achive that in kendo ui like http://demos.devexpress.com/MVC/GridView/Filtering.
Filter section should be at the header and each column can have its own multi selection filter.

is there anyway to do that in kendo ui?

thanks

Alexander Valchev
Telerik team
 answered on 14 Oct 2013
3 answers
171 views
Hi,

I  am working with a login page, in that form i am having two fields(username, password). When i submit the page, it will validate the form and post the data to a url and api returns a message if the credential are correct. Now i want to get the success value to check whether its success/error. If success i am navigate to dashboard page. Please find my index.html, loginViewModel.js files. Kindly approach me how to get the response value from server and navigate to other page one its success.

index.html

<!DOCTYPE html><br><html><br><head><br><meta charset="ISO-8859-1"><br><title>Login</title><br>  <link href="styles/kendo.mobile.all.min.css" rel="stylesheet" /><br></head><br><body><br> <div data-role="view" data-title="Settings" id="loginForm"><br>       <header data-role="header"><br>           <div data-role="navbar"><br>              <span data-role="view-title"></span><br>          </div><br>        </header><br>       Server: <input id="serverid" name="authserver" type="url" data-bind="value: authserver" required data-required-msg="Enter server address" data-url-msg="Enter a valid url for server"><br>        <span class="k-invalid-msg" data-for="authserver"></span><br/><br>        UserName: <input id="emailid" name="username" type="email" data-bind="value: username" required data-required-msg="You need to enter email" data-email-msg="Enter a valid email id"><br>      <span class="k-invalid-msg" data-for="username"></span><br/><br>      Password: <input id="pwd" name="password" type="password" data-bind="value: password" required validationMessage="Enter Password with minimum 6 characters"><br>      <span class="k-invalid-msg" data-for="password"></span><br/><br>      <button data-bind="click: getUserDetails">Login</button><br>    </div><br>    <script src="scripts/jquery.min.js"></script><br>    <script src="scripts/kendo.all.min.js"></script><br>    <script src="scripts/viewModel/loginModel.js"></script><br>    <script src="scripts/viewModel/loginViewModel.js"></script><br>    <script><br>     /** Initial the kendo mobile application */<br>       var app = new kendo.mobile.Application(document.body);<br>    </script><br></body><br></html>


Below is the viewModel file loginViewModel.js


var validator = $("#loginForm").kendoValidator().data("kendoValidator");<br><br>var loginViewModel = kendo.observable({<br> authserver: "",<br> username:"",<br>    password:"",<br>    getUserDetails: function(){<br>     if(validator.validate()){<br>       //  alert("Server Address -- "+ this.get("authserver")+" User Name -- "+ this.get("username")+" User Password -- "+ this.get("password"));<br>          <br>                var dataSource = new kendo.data.DataSource({<br>                    transport:{<br>                     read:{<br>                          url: "http://127.0.0.1/api/index.php",<br>                          type: "POST",<br>                           dataType: "html",<br>                           <br>                        }<br>                   },<br>                  change: function(data){<br>                     alert("aaa"+dataSource.data);<br>                       alert(data);<br>                    },<br>                  error: function(xhr, error){<br>                        console.log(xhr);<br>                       console.log(error);<br>                 }<br>               });<br>     }else{<br>          alert("Not valid");<br>     }<br>       <br>    },<br>  <br>}) ;



kendo.bind($("#loginForm"), loginViewModel);
Kiril Nikolov
Telerik team
 answered on 14 Oct 2013
1 answer
258 views
Hi! i creating a nested list view as much as possible it must be accordion like this:
 http://jquerymobile.com/wp-content/uploads/2012/07/jquery-mobile-collapsible-lists.png

But i cant find any examples near to that so i aim to do this
http://demos.telerik.com/teampulse-demo/view#IterationsStatus 

with this code:

<!--- Layout --->
    <section data-role="layout" data-id="default">
        <!--View content will render here-->
        <header data-role="footer">
            <div data-role="navbar">
                <span data-role="view-title">Home</span>
                <a data-align="right" data-icon="icon-three-dot" data-role="button" href=""></a>
                <a data-align="left" data-icon="icon-three-bar" data-role="button"  href="#sideMenuView" data-rel="drawer"></a>
            </div>
        </header>
    </section>
<!--- End Layout --->
 
<!--- Drawers --->
    <div data-role="drawer" id="sideMenuView" data-show="rebindListView" data-transition="slide">
        <div data-role="footer">
           <div id="sideMenuNavbar" data-role="navbar" class="bg-white">
                <span data-role="view-title" >
                    <img src="./styles/images/SlideNav.png">
                </span>
                <a data-role="backbutton" id="btnDrawerBack" data-align="left">Back</a>
           </div>
        </div>
        <div class="container">
            <ul id="sideMenuListView"
                class="sideMenuListView"
                data-role="listview"
                data-template="sideMenuDrawer-template"
                data-style="inset">
            </ul>
        </div>
    </div>
<!--- End Drawers --->
 
<!-- Script Templates -->
         <script id="sideMenuDrawer-template" type="text/x-kendo-template">
        <div class="#: style #">
            # if (data.style == 'settings') { #
                <a data-align="left" data-icon="icon-gears" data-role="button" class="btn-icon" data-click="rebindListView"></a>
            # } else { #
                <a data-align="left" data-icon="icon-angle-right" data-role="button" class="btn-icon" data-click="rebindListView"></a>
            # } #
            <div data-role="button" class="text btn-text" data-click="#: view #">#: name #</div>
        </div>
         </script>
<!-- End Script Templates -->
 
<!-- Script Variables -->
    <script>
        var category = new kendo.data.DataSource({
            data: [
                {id: 1, name: "Dogs", view:"dogView", style:""},
                {id: 2, name: "Cats", view:"catModalView", style:""},
                {id: 3, name: "Birds", view:"birdView", style:""},
                {id: 4, name: "Snakes", view:"snakeView", style:""},
                {id: 5, name: "Cows", view:"cowView", style:""}
            ]
        }),
        type = new kendo.data.DataSource({
            data: [
                {id: 1, category: 2, name: "Persian"},
                {id: 2, category: 2, name: "Arabian"},
                {id: 3, category: 2, name: "Local"},
                {id: 4, category: 1, name: "Husky"},
                {id: 5, category: 1, name: "Retriever"}
            ]
        })
    </script>
<!-- End Script Variables -->
 
<!-- Script Functions -->
    <script>
        function rebindListView(e) {
            var params  = e.view.params,
                element     = e.view.element,
                backButton  = element.find('#btnDrawerBack'),
                listView    = element.find("#sideMenuListView").data('kendoMobileListView');
                 
            if (params) {
                var parentID = e.view.params.parent;
                    sideItem    = type.filter({field: "category", operator: "eq", value: parentID});
                     
                    if (sideItem) {
                        backButton.show();
                        listView.setDataSource(sideItem);
                    } else {
                        // redirect to root
                        setTimeout(function() {
                            kendo.mobile.application.navigate('#homeView');
                        }, 0);
                    }
                     
            } else {
                backButton.hide();
                listView.setDataSource(category);
            }
     
            e.view.scroller.scrollTo(0, 0);
             
        }
 </script>
<!-- End Script Functions -->

When i click the button for more options (the one that call rebindListView)
i always got this error: Uncaught TypeError: Cannot read property 'params' of undefined index.html:206
Kiril Nikolov
Telerik team
 answered on 14 Oct 2013
3 answers
336 views
Hi There,

I'm trying to get a dropdown list used with Kendo UI mobile and data bind the source of the dropdown list to some set data.

It seems to work when a plain select is used but when i change the data-role to dropdown list the list is always empty. 

I have include a sample of the problem i am experiencing.

http://jsbin.com/ADOTuG/1/

Is there something I am doing wrong here or should do differently?

Thanks,

Rob
Petyo
Telerik team
 answered on 14 Oct 2013
1 answer
208 views
I'm building a table with large number of columns which I want to be able to show and hide from user menu.
As the example I can use this

http://demos.kendoui.com/web/grid/column-menu.html

My problem is that show/hide menu is the same for all columns, but it is buried deep inside column menu of each individual column.
I want to have that menu only in one place, possibly in table toolbar or exposed in footer so the user does not need to click through the complex dropdowns.



Nikolay Rusev
Telerik team
 answered on 14 Oct 2013
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?