Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > context menu of GridView

Reply
Thread Tools

context menu of GridView

 
 
CSharpGuy
Guest
Posts: n/a
 
      06-13-2006
Is it possible to create a 'context menu' for my GridView?
What I need to when the user clicks on a row in my gridview I need to show a
menu with links to a details page for that row of data.



 
Reply With Quote
 
 
 
 
Balasubramanian Ramanathan
Guest
Posts: n/a
 
      06-14-2006
You can do it in javascript..in onitemdatabound of the gridview for each
row add the required javascript in onmousedown

example


protected override void OnItemDataBound(DataGridItemEventArgs e)
{
if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType
== ListItemType.AlternatingItem))
{
e.Item.Attributes["onmousedown"] =
"javascript:YourMenuFunction();";


write the javascript for displaying the menu in YourMenuFunction()

"CSharpGuy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is it possible to create a 'context menu' for my GridView?
> What I need to when the user clicks on a row in my gridview I need to show
> a menu with links to a details page for that row of data.
>
>
>



 
Reply With Quote
 
 
 
 
Vivek
Guest
Posts: n/a
 
      07-15-2006
Check this link.. this will surely help u...

http://msdn.microsoft.com/msdnmag/is...1/CuttingEdge/
---
Posted via www.DotNetSlackers.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ Topic - How do I suppress a context menu (right-click menu)? (2012-02-22) FAQ server Javascript 0 02-22-2012 12:00 AM
add menu item to context (right-click) menu? lcplben Javascript 3 10-30-2009 11:56 PM
Strange Context Error: Context 0x197ee0 is disconnected in VS 2005 =?Utf-8?B?U3VuU21pbGU=?= ASP .Net 0 01-10-2006 03:59 PM
Can I holdup and activate the context-menu as a sub-menu? Michel Javascript 2 08-02-2004 09:54 PM
Context.Items vs Context.Handler (passing values between pages) VS_NET_DEV ASP .Net 2 05-25-2004 01:16 PM



Advertisments