Grid Edit popup function not firing

4 posts, 1 answers
  1. Michael
    Michael avatar
    3 posts
    Member since:
    Jan 2015

    Posted 02 Feb 2015 Link to this post

    Hi Everyone --

    I cannot get my Edit popup window to fire. I don't see any events happening when I debug the application. My add user function works quite well. 

    Any ideas why this is?

    @(Html.Kendo().Grid<
    Areas.Admin.ViewModels.UserManagement.UserManagementVM>()
                    .Name("UserProfileGrid")
                    .Resizable(c => c.Columns(true))
                    .Selectable()
                    .Filterable()
                    .Groupable()
                 .ToolBar(toolbar =>
                        {
                            toolbar.Template(@<text>
     
     
                                <input id="ButtonAddUser" type="button" class='k-button k-grid-add' value="Add User"/>
                                <input id="ButtonEditUser" type="button" class="k-button k-grid-edit" value="Edit user" />
                                 
                            @(Html.Kendo().Button()
                            .Name("ButtonRefreshPage")
                            .HtmlAttributes(new { type = "k-button" })
                            .Icon("history")
                            .Content("Refresh Page")
                            .Events(x => x.Click("RefreshPage")))
     
                            @(Html.Kendo().Button()
                            .Name("ButtonDeleteUser")
                            .HtmlAttributes(new { type = "k-button" })
                            .Icon("history")
                            .Content("Delete a user")
                            .Events(x => x.Click("DeleteUser")))
     
                            @(Html.Kendo().Button()
                            .Name("ButtonAbout")
                            .HtmlAttributes(new { type = "k-button" })
                            .Icon("history")
                            .Content("About")
                            .Events(x => x.Click("aboutButtonClick")))
                            </text>);
                        })
     
                        .Editable(editable => editable.Mode(GridEditMode.PopUp)
                        )
     
                        .Columns(columns =>
                        {
                            //columns.Bound(e => e.UserOrg).Width(25).Title("User Organization");
                            columns.Bound(e => e.IsApproved).Width(50).Title("Approved Status");
                            columns.Bound(e => e.UserName).Width(150).Title("User Name");
                            //columns.Bound(e => e.user).Width(150);
                            columns.Bound(e => e.EmailAddress).Width(150).Title("Email Address");
                        })
     
                        .Sortable()
                        .Scrollable()
                        .Pageable()
                        .Filterable()
                        .Selectable()
                        .Events(e =>
                        {
                          e.Change("packageRowSelectionChanged");
                        })
                        .DataSource(dataSource => dataSource
                        .Ajax()
                        .PageSize(20)
                        .Events(E => E.Error("error_handler"))
                        .Model(model => model.Id(e => e.UserId))
                        .Read(read => read.Action("ReadUsers", "UserManagement"))
                        .Create(create => create.Action("UserProfileCreator", "UserManagement"))
                        .Update(update => update.Action("UserProfileCreator", "UserManagement"))
                        .Destroy(destroy => destroy.Action("EditingPopUp_Destroy", "UserManagement"))
                        ))
  2. Michael
    Michael avatar
    3 posts
    Member since:
    Jan 2015

    Posted 03 Feb 2015 in reply to Michael Link to this post

    *bump*

    Still no idea anyone?
  3. Answer
    Rosen
    Admin
    Rosen avatar
    3253 posts

    Posted 04 Feb 2015 Link to this post

    Hello Michael,

    In order to use the built-in popup editing functionality of the grid, you will need to use the edit command column as shown in this online demo.
    Having a custom button in the toolbar will not trigger the built-in editing. If you want such functionality you could use the editRow method of the Grid and pass the appropriate row element in order to open the popup editor.

    Regards,
    Rosen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  4. Michael
    Michael avatar
    3 posts
    Member since:
    Jan 2015

    Posted 04 Feb 2015 in reply to Rosen Link to this post

    Thanks Rosen!
Back to Top