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

Set navbar title within drawer

1 Answer 40 Views
NavBar
This is a migrated thread and some comments may be shown as answers.
BeOne Stuttgart
Top achievements
Rank 1
BeOne Stuttgart asked on 23 Sep 2016, 08:03 AM

Hallo,

 

how do you change the title of a navbar within a drawer in code?

    

  <div id="mainMenu"
         data-role="drawer"
         data-swipe-to-open="false"
         data-model="views.index.viewModel"        
         data-title="">
        <header data-role="header">
            <div data-role="navbar" id="mainNavBar">
                <span data-role="view-title"></span>
            </div>
        </header>
        <ul id="mainMenuListView"
            class="item-list"
            data-role="listview"
            data-bind="source: menuItemDataSource"
            data-auto-bind="false"
            data-template="mainMenuItemTemplate"
            data-header-template="mainMenuHeaderTemplate"></ul>
 </div>

 

1 Answer, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 27 Sep 2016, 08:01 AM
Hello,

To achieve this you should use the data-title attribute: 
<!-- ... -->
<header data-role="header">
    <div data-role="navbar" id="mainNavBar">
        <span data-role="data-title">My title</span>
    </div>
</header>


Regards,
Iliana Nikolova
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
NavBar
Asked by
BeOne Stuttgart
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Share this question
or