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

How to add 2 Create button in the toolbar using mvc .net

2 Answers 246 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jose
Top achievements
Rank 1
Jose asked on 21 Sep 2012, 08:12 PM
Hi, so I have a grid that shows folders and files.  How do I add 2 create button in the Grid so that I can have 1 button to create Folder and 1 button to create File in MVC asp.net that calls different action in the backend? And those two create buttons needs to be using ajax.

Here is how i am doing it for 1 button:

.ToolBar(c => c.Create())
    .DataSource(dataSource => dataSource
        .Ajax()
            .Model(model => model.Id(f => f.FileId))
                .Read(read => read.Action("GridRead""Files"))



Thanks.

2 Answers, 1 is accepted

Sort by
0
Jose
Top achievements
Rank 1
answered on 24 Sep 2012, 07:29 PM
Is this not possible?
0
Kai
Top achievements
Rank 1
answered on 03 Oct 2012, 03:00 PM
This is what worked out for me: 
Then you can use kendo window to create your custom fields
I used partials to retrieve and fill the kendo windows. Totally doable
.ToolBar(bar => { bar.Custom().Text("Add New Folder") ; bar.Custom().Text("Create New File"); })

@Html.Kendo().Window().Name("wdwCreateFolder").Title("Create File").Modal(true).Visible(false).Draggable(true).Content(@<text>
                            <div id="divCreateNewFolder"></div>
                        </text>)

@Html.Kendo().Window().Name("wdwCreateFile").Title("Create File").Modal(true).Visible(false).Draggable(true).Content(@<text>
                            <div id="divCreateNewFile"></div>
                        </text>)

Tags
Grid
Asked by
Jose
Top achievements
Rank 1
Answers by
Jose
Top achievements
Rank 1
Kai
Top achievements
Rank 1
Share this question
or