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

changing button parameters

2 Answers 24 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Cecil
Top achievements
Rank 1
Cecil asked on 07 Oct 2015, 09:09 PM

I am developing a new app and have a question.

I have a view that displays the employees in my company.  You can click on an employees name and 
be transfered to a second view (see text below).

On the second view, I will display the employee's name and department,followed by two buttons that 
allow you to choose what view to see next.

My question is how do I change the buttons so that I pass the employees badge number to the
next view?

<div data-role="view" data-title="Details" data-layout="main" data-init="onInit">

<div>
        <ul data-role="listview" data-source="employee" data-template="employee-template" data-style="inset"></ul>
    </div>

<div>
<a data-role="button">TRAINING COMPLETED</a>
<a data-role="button">TRAINING NEEDED</a>
</div>

</div>

<script id="employee-template" type="text/x-kendo-template">
    <div>
<label>#: LastNameFirstName #</label>
        <label>#: DepartmentName #</label>        
    </div>
</script>

<script>
    // Load the Employee
    var employee = new kendo.data.DataSource({
        type: 'everlive',
        transport: {
            typeName: 'dbo_Employee'
        },
        schema: {
            model: {
                id: Everlive.idField,
                fields: {
                    'LastNameFirstName': { defaultValue: '' },
                    'DepartmentName': { defaultValue: '' }
                }
            }
        },
        serverFiltering: true,
        filter: {
            logic: "and",
            filters: [
                { field: 'CompanyId', operator: 'eq', value: sessionStorage.CompanyId },
                { field: 'IsActive', operator: 'eq', value: 1 },
                { field: 'Id', operator: 'eq', value: 1234 }                    
            ]
        }
    });
</script>

2 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 12 Oct 2015, 04:39 PM
Hello Cecil,

If I understood correctly you would like to provide information about the selected employee to the next view.
This can be done via query string parameters in the button href or through the navigate method of the application.

For your convenience I prepared a short example: http://dojo.telerik.com/IkUMU

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Cecil
Top achievements
Rank 1
answered on 14 Oct 2015, 03:43 PM
Thanks Alexander, you're a great help!
Tags
General Discussion
Asked by
Cecil
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Cecil
Top achievements
Rank 1
Share this question
or