Click here to Skip to main content
16,004,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi everyone,
I'm new on asp.net. I developed a screen with a gridview which displays details of some employee's and their shift details, and on rigth-click it displays a context-menu and from context-menu open an another div which displays shift details with an update-button. What i need is, from gridview on right-click a row, need to keep the employee id in a hiddenplace, any function by using javascript or jquery

any other suggestion....or is it possible

or can i get value on mouseover function using javascript


Thanks in advance.
Posted
Updated 19-Jun-13 19:53pm
v6
Comments
Christian Graus 20-Jun-13 1:09am    
ASP.NET is out of date, learn MVC instead.
Thanks7872 20-Jun-13 2:12am    
I request you to kindly provide solution if possible because it depends on so many factors why OP used ASP.NET? Further, we cant/should not under estimate strengths of ASP.NET. Question is tagged as ASP.NET,it means we should move in that direction.
Christian Graus 20-Jun-13 2:15am    
I posted a comment, not a solution. This person is trying things way to hard for someone 'new' to ASP.NET, and I felt it worth mentioning that better frameworks exist. Odds are, he's taken paid work in a framework he does not understand and has to learn it. That's fine. Perhaps someone will post an answer doing his job for him. But, in case he's really someone trying to learn skills for eventual work, I felt my advice was good and worth taking.

I think you want employee id in your context menu. so you can use hidden field when user right click on column and save id of employee in hidden field after that you can access that value using javascript function
JavaScript
var hv = $('#HiddenfieldName').val();
 
Share this answer
 
 
Share this answer
 
v2
If you will add a HiddenField inside TemplateField, then no need to get the ID and store it again in one HiddenField.

Refer - Get GridView selected row DataKey in Javascript[^].

Here it has a TemplateField, which is a HiddenField and it stores the ID.
You can get this ID in javaScript for any row, when it is selected.
 
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