This is a migrated thread and some comments may be shown as answers.

How we can Enable left click on RadGrid

1 Answer 32 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alok
Top achievements
Rank 1
Alok asked on 11 Jan 2012, 06:11 AM
Hiiiiiiii,
          I have in prob like i want enable the menu on left click on specifice column only seprately on  radgrid......          

                                   plz reply me soon                                                  

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 11 Jan 2012, 06:35 AM
Hello Alok,

You can access the column and attach contextmenu as shown below.
C#:
protected void grid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
 if (e.Item is GridDataItem)
 {
   GridDataItem item = (GridDataItem)e.Item;
   Button btn = (Button)item["UniqueName"].Controls[0];
   btn.OnClientClick = "show(this, event); return false;";
 }
}
Javascript:
function show(sender, args)
{
   var contextMenu = $find("<%= RadMenu1.ClientID %>");
   contextMenu.show(args);
}

-Shinu.
Tags
Grid
Asked by
Alok
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or