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

[Solved] Issue with "Close" Button in PopUp Mode

0 Answers 38 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Erik
Top achievements
Rank 1
Erik asked on 01 Dec 2010, 04:01 PM
I'm using an editable grid with a details view in popup-mode. Everything works fine, however, clicking the "Close" button just closes the popup window and leaves the grid in edit mode. Without the details view it works fine.

What am I missing here?

Here's the code snippet of the grid I'm using:

<% Html.Telerik().Grid(Model)
    .Name("Materials")
    .Editable(editing => editing
        .Mode(GridEditMode.PopUp)           
        .DisplayDeleteConfirmation(true)
    )
    .DataKeys(dataKeys => dataKeys.Add(key => key.MaterialID))
    .ToolBar(commands => commands
        .Insert()           
        .ButtonType(GridButtonType.ImageAndText)
    )
    .DataBinding(dataBinding => dataBinding
    .Server()
        .Select("Index", "Materials")
        .Insert("InsertMaterial", "Materials")
        .Update("SaveMaterial", "Materials")
        .Delete("DeleteMaterial", "Materials")
    )
    .Columns(cols =>
    {
        cols.Bound(m => m.NameEN);
        cols.Bound(m => m.ShortNameEN);
        cols.Bound(m => m.NameIUPAC);
        cols.Bound(m => m.CASNo);
        cols.Command(commands =>
        {
            commands.Edit().ButtonType(GridButtonType.ImageAndText);
            commands.Delete().ButtonType(GridButtonType.ImageAndText);
        }).Title("Actions");
    })
    .DetailView(detailView => detailView.Template(e =>
    {
        %>
            <%
                Html.Telerik().TabStrip()
                    .Name("TabStrip_" + e.MaterialID)
                    .SelectedIndex(0)                       
                    .Items(items =>
                    {
                        items.Add().Text("Material Information").Content(() =>
                        {
                            %>
                                <div class="material-details">
                                    <ul>
                                        <li>
                                            <label>Name English:</label><%= e.NameEN %>
                                        </li>
                                        <li>
                                            <label>Name German:</label><%= e.NameDE %>
                                        </li>
                                        <li>
                                            <label>Short Name English:</label><%= e.ShortNameEN %>
                                        </li>
                                        <li>
                                            <label>Short Name German:</label><%= e.ShortNameDE %>
                                        </li>
                                        <li>
                                            <label>IUPAC Name:</label><%= e.NameIUPAC %>
                                        </li>
                                        <li>
                                            <label>CAS No.:</label><%= e.CASNo %>
                                        </li>
                                        <li>
                                            <label>EU No.:</label><%= e.EUNo %>
                                        </li>                                           
                                   </ul>
                                </div>                               
                            <%                                                               
                        });                                                      
                    })
                    .Render();
             %>
        <%
    }))       
    .Pageable()
    .Sortable()
    .Filterable()
    .Render();
%>

Thanks in advance!
Tags
Grid
Asked by
Erik
Top achievements
Rank 1
Share this question
or