Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to apply right click on gridview in asp.net?

Posted on 2014-02-19
3
Medium Priority
?
4,415 Views
Last Modified: 2016-09-15
Sir/Ma'am

How to apply right click on gridview in asp.net?

Thanks in advance
0
Comment
Question by:hc_gupta
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 1500 total points
ID: 39870161
0
 
LVL 10

Expert Comment

by:Monica P
ID: 39873121
Refer :

http://www.c-sharpcorner.com/Blogs/11128/gridview-with-context-menu-in-Asp-Net.aspx

https://sites.google.com/site/spyderhoodcommunity/tech-stuff/jquerypopupcontextmenu

I have come across this code long before., Check whether below concept works ....

Context menu in Gridview (ASP.NET)

To implement contextmenu in asp.net, add this code on rowdatabound.

Protected Sub Grd_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles Grd.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then

e.Row.Attributes.Add("oncontextmenu", "return ShowMenu(" + e.Row.RowIndex.ToString() + ")")
RowIndex = e.Row.RowIndex
End If
End Sub


To popup the context menu, paste this code in header


<script language="javascript" type="text/javascript">
var Div = document.getElementById("DivContextMenu");

function HideMenu() {
Div.style.display = "none";
}
function ShowMenu(RowIndex) {
Div.style.display = "block";
return false;
}

</script>
0
 

Expert Comment

by:Aleksandra Nikolova
ID: 41800997
If you want you can see also shieldui contextmenu - it`s very easy to use
https://demos.shieldui.com/aspnet/contextmenu/basic-usage
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question