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

OnRowContextMenu on Grid with EnablePostBackOnRowClick active

2 Answers 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Grendizer
Top achievements
Rank 1
Grendizer asked on 04 Dec 2008, 03:55 PM
Hello,

do you have any guidelines on how to implement a custom context menu display on grid that enables the post back on row click, meaning on right click on a new row, the postback should be raised, and context menu should be fired afterward.

Many thanks in advance for your answer.

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Dec 2008, 07:28 AM
Hi,

You can fire an ajax request in the RowContextMenu client event and perform any  functions in the server side.

function RowContextMenu(sender, eventArgs)  
{  
$find('<%=RadAjaxManager1.ClientID%>').ajaxRequest();  
}  
 

 

Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest  
 
RadGrid1.Rebind()  
 
End Sub  
 

 

Thanks,

Princy

 

0
Grendizer
Top achievements
Rank 1
answered on 05 Dec 2008, 12:05 PM
Hello Princy, thanks for the quick answer.

then you think if I do the following

function RowContextMenu(sender, eventArgs)  
{  
$find('<%=RadAjaxManager1.ClientID%>').ajaxRequest();  
//- then here displaying the menu with refreshed options from the previous postback
}  

Would it be fine ?!

Thanks.
Seb.
Tags
Grid
Asked by
Grendizer
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Grendizer
Top achievements
Rank 1
Share this question
or