This is a migrated thread and some comments may be shown as answers.

when click on Logout button and Login with new User old List should be replaced with new

1 Answer 394 Views
AppBuilder Windows client
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Radhika
Top achievements
Rank 1
Radhika asked on 28 Aug 2013, 10:03 AM
hello all,
  In mobile application when i click on Logout button and Login with new user list should bind with new data not with the old data.
Below is the sample code

<li>
                            <div  id="btnLoginSubmit" type="button" data-role="button" data-bind="click: Login" data-click="Login"  class="submit-btn">Log In</div>
                        </li>

<div style="float:right;color:white;" >

                        <a data-align="right" data-rel="drawer" data-click="Logout" data-role="button" class="back-btn" id="btnLogout" >Logout</a>
                    </div>

function Logout(e){
   
    app.navigate("#vwLogin");
   
  
}

function Login(e) {
UserName = $("#txtUserName").val();
Password = $("#txtPassword").val();
   
if (UserName != "" && Password != null) {
app.showLoading();
$.ajax({
type: 'GET',
contentType: "application/json; charset=utf-8",
url: ServiceURL + "/Login",                        //Service URL
data: {Email:UserName,password:Password},          //Passing parameters
dataType: "jsonp",
success: OnLoginSuccess,
error: OnLoginError
}); 
app.hideLoading();
}
else {
alert("User name and Password are required.");
}
function OnLoginSuccess(data, status) {
    
if (data != null) {

userData = data[0];  
      
app.navigate("#tabstrip-openwo");
            

}
else {
alert("Invalid Username/Password...");
}
}

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 30 Aug 2013, 07:21 AM
Hello Radhika,

You can invoke the refresh method of the Kendo UI ListView that would reload the data in the ListView.

Regards,
Steve
Telerik

Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
Tags
AppBuilder Windows client
Asked by
Radhika
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or