context menu of GridView

Discussion in 'ASP .Net Datagrid Control' started by CSharpGuy, Jun 13, 2006.

  1. CSharpGuy

    CSharpGuy Guest

    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.
     
    CSharpGuy, Jun 13, 2006
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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.
    >
    >
    >
     
    Balasubramanian Ramanathan, Jun 14, 2006
    #2
    1. Advertising

  3. CSharpGuy

    Vivek Guest

    Vivek, Jul 15, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VS_NET_DEV
    Replies:
    2
    Views:
    3,816
    jenny
    May 25, 2004
  2. =?Utf-8?B?U3VuU21pbGU=?=
    Replies:
    0
    Views:
    712
    =?Utf-8?B?U3VuU21pbGU=?=
    Jan 10, 2006
  3. Michel
    Replies:
    2
    Views:
    151
    Michel
    Aug 2, 2004
  4. lcplben
    Replies:
    3
    Views:
    504
    Garrett Smith
    Oct 30, 2009
  5. FAQ server
    Replies:
    0
    Views:
    1,191
    FAQ server
    Feb 22, 2012
Loading...

Share This Page