Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

here is my code for grid

XML
<table id="dynamic-table" class="table table-striped table-bordered table-hover">
            <thead>
                <tr>
                    <th>Name</th>
                    <th>Due Date</th>
                    <th>Department</th>
                    <th>Priority</th>
                    <th>
                        Action
                    </th>

                </tr>
            </thead>
            <tbody>
                @if (@Model != null)
                {
                    foreach (var item in Model)
                    {
                        <tr>
                            <td>
                                @item.Name
                            </td>
                            <td>@item.DueDate</td>
                            <td>@item.Department</td>
                            <td>@ConfigurationHelper.GetItemDescription(BOType, "Priority", item.Priority.ToString())
</td>
                            <td>
                                <div class="hidden-sm hidden-xs action-buttons">
                                    <span>
                                        <a class="green" href="@Url.Action("Edit", "Submission", new { id = @item.SubmissionId })">
                                            <i class="ace-icon fa fa-pencil bigger-130"></i>
                                        </a>
                                        <a class="green" href="@Url.Action("Review", "Submission", new { id = @item.SubmissionId })">
                                            <i class="ace-icon fa fa-eye bigger-130 blue"></i>
                                        </a>
                                    </span>
                                </div>
                            </td>
                        </tr>
                    }
                }
            </tbody>
        </table>


How should i open a row data in the other view up on double click of the row
in grid?
Posted
Updated 11-Jan-16 22:36pm
v2
Comments
F-ES Sitecore 12-Jan-16 4:36am    
Users aren't going to know to double-click, it's not a traditional web interface. Instead just give a "view detail" link that is a link to your detail page, or a link that shows your detail info in a manner of your choosing.

1 solution

Use Jquery dblclick() function.

1. Set a class for your tr
HTML
...
<table><tbody><tr class="showInfo">
....
</tr></tbody></table>

2. Then write code to open pop up
JavaScript
$(".showInfo").dblclick(function(){
    //Read nearest td value for your Name,Due Date etc.
    //set these to your label on pop up.
     //Open your pop with all the details
});


Good luck.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900