We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Unbound Column Editing with a dialog

I would like is to combine Unbound column editing with dialog editing, however, this is not working for me.

I have the following grid:

    @(Html.Syncfusion().Grid<UserDetails>("Users")
                        .ActionMode(ActionMode.JSON)
                        .Datasource(Model)
                        .Column(
                            col =>
                            {
                                col.Add("ManageUsers", c =>
                                {
                                    c.Commands(cmd =>
                                    {
                                        cmd.Command(CommandTypes.Edit).Text("Edit").ImageUrl(Url.Content("~/Images/Icons/edit.gif")).ItemType(UnBoundItemTypes.HyperLink).ItemOption(UnboundItemOptions.ImagePlusText);
                                    }
                                    );
                                    c.Commands(cmd1 =>
                                    {
                                        cmd1.Command(CommandTypes.Delete).Text("Disable").ImageUrl(Url.Content("~/Images/Icons/deny.gif")).ItemType(UnBoundItemTypes.HyperLink).ItemOption(UnboundItemOptions.ImagePlusText);
                                    }
                                    );
                                }
                                ).UnBound(true).Width(110).HeaderText(" ").AllowFilter(false);                                
                                col.Add(c => c.FullName).HeaderText("Full Name").Width(200).AllowGrouping(false);
                                col.Add(c => c.UserName).HeaderText("User Name").Width(200).AllowGrouping(false);
                                col.Add(c => c.IsDisable).HeaderText("Is Disable?").Width(75);
                                col.Add(c => c.AccountName).HeaderText("Account").Width(150);
                                col.Add(c => c.IsAccountAdmin).HeaderText("Is Admin?").Width(75);
                                col.Add(c => c.IsAccountContact).HeaderText("Is Contact?").Width(75);


                            }
                        )
                        .EnablePaging()
                        .EnableSorting()
                        .EnableFiltering()
                        .StackedHeader(sh =>
                            {
                                sh.StackedRows("srHeader", srH =>
                                {
                                    srH.StackedColumn("User Details", ud =>
                                    {
                                        ud.Add(c => c.FullName);
                                        ud.Add(c => c.UserName);
                                        ud.Add(c => c.CompanyName);
                                        ud.Add(c => c.IsDisable);
                                    });
                                    srH.StackedColumn("Account Details", ad =>
                                    {
                                        ad.Add(c => c.AccountName);
                                        ad.Add(c => c.IsAccountAdmin);
                                        ad.Add(c => c.IsAccountContact);
                                    });
                                });
                            }
                        )
                        .ToolBar(bar =>
                            {
                                bar.Add(GridToolBarItems.AddNew);
                            }
                        )
                        .ShowStackedHeader(true)
                        .Mappers(mapper =>
                            {
                                mapper.InsertAction("InsertUser").SaveAction("SaveUser").DeleteAction("DisableUser");
                            }
                        )
                        .Editing(edit =>
                            {
                                edit.Dialog(dialog =>
                                    {
                                        dialog.Position(DialogPositions.Center);
                                        dialog.Width(400);
                                        dialog.Height(400);
                                        dialog.Show(DialogAnimations.clip);
                                        dialog.Hide(DialogAnimations.drop);

                                    }
                                );
                                edit.AllowNew(true);
                                edit.AllowEdit(true);
                                edit.AllowDelete(true);
                                edit.EditMode(GridEditMode.DialogTemplate);
                                edit.DialogModeEditorTemplate("UserEditorTemplate");
                                edit.PrimaryKey(key => key.Add(p => p.UserId));
                            }
                        )
               )

I can get the dialog to work with the toolbar, however it will not work with the unbound commands.

Thanks
Eric

1 Reply

BM Bala Murugan A.S Syncfusion Team August 8, 2013 06:43 AM UTC

Hi Eric,

Thanks for using Syncfusion Products.

We have given update this query in the incident 111578. We suggest you to followup that incident for any further details.

Please let us know if you have any concerns.

Regards,
Bala Murugan A.S

Loader.
Live Chat Icon For mobile
Up arrow icon