User menu / context menu Mouse or right click

I currently have an ASP.NET GridView that displays several columns for the user, one of which is a link to view the details of a particular record. On the details page, the user has access to other pages to add new entries (for example, on the contact entries page, you can click the link to add a new car purchase).

I think it would be great if the MouseOver or right-click menu appears that appears above the GridView line or any item that would allow the user to go directly to the page for adding new cars. I would like to try to reduce the number of mouse clicks and page pages in order to perform certain actions.

Are there any free components or code examples that can be provided for this? I know that I saw this in some web applications before, I just don't want to reinvent the wheel.

The application I'm working with is ASP.NET 3.5 and is already configured to use jQuery, if necessary to solve it ... Below is a brief overview of the code for my Grid. The first column is actually a hyperlink, but I deleted it for this sample.

<asp:GridView ID="gvResults" runat="server" DataKeyNames="PERSONID" AutoGenerateColumns="False"
    CellPadding="4" ForeColor="#333333" OnSelectedIndexChanged="gvResults_SelectedIndexChanged"
    Width="100%" OnRowDataBound="gvResults_RowDataBound" meta:resourcekey="gvResultsResource1">
    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    <Columns>
        <asp:BoundField DataField="PERSONID" HeaderText="PERSON ID" meta:resourcekey="BoundFieldResource1" />
        <asp:BoundField DataField="FNAME" HeaderText="FIRST NAME" meta:resourcekey="BoundFieldResource2" />
        <asp:BoundField DataField="LNAME" HeaderText="LAST NAME" meta:resourcekey="BoundFieldResource3" />
        <asp:BoundField DataField="DOB" HeaderText="DATE OF BIRTH" HtmlEncode="False" meta:resourcekey="BoundFieldResource4" />
    </Columns>
    <EditRowStyle BackColor="#999999" />
    <EmptyDataTemplate>
        <span style="color: Red;">
            <asp:Literal ID="litErrorNoResultsFound" runat="server" EnableViewState="False" meta:resourcekey="litErrorNoResultsFoundResource1"
                OnInit="litErrorNoResultsFound_Init"></asp:Literal>
        </span>
    </EmptyDataTemplate>
    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
    <HeaderStyle BackColor="#3494CC" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
</asp:GridView>
+3

Source: https://habr.com/ru/post/1705733/


All Articles