Kamal
Kamal

Reputation: 363

mix two toolbars in kendo grid

I have a kendo grid. I am using an add and custom button in the toolbar as the following code:

toolbar: ["create", {
            text: "Print record",
            className: "k-grid-custom",
            imageClass: "k-add"
        }],

I also want to add a custom toolbar (dropdown menu) as this example

I used similar code in the demo like

toolbar: kendo.template($("#toolbarIsExpire").html()),

<script type="text/x-kendo-template" id="toolbarIsExpire">
                <div class="toolbar">
                    <label  for="is_expired">Is Expired ?</label>
                    <input type="search" id="is_expired" style="width: 75px;"/>
                </div>
</script>

I want to show in the toolbar the add button and my custom button and the dropdown menu (IsExpired)

How to mix between the two toolbar in order to have both of them ?

Upvotes: 0

Views: 2046

Answers (1)

Vojtiik
Vojtiik

Reputation: 2560

Extend your template:

<script type="text/x-kendo-template" id="toolbarIsExpire">
    <div class="toolbar">
        <label  for="is_expired">Is Expired ?</label>
        <input type="search" id="is_expired" style="width: 75px;"/>
    </div>
    <a class="k-button k-button-icontext k-grid-add" href="#"><span class="k-icon k-add">  </span>Add new record</a>
</script>

Upvotes: 1

Related Questions