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

Handling client event OnRowResized in server-side

3 Answers 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Virgil Rodriguez
Top achievements
Rank 1
Virgil Rodriguez asked on 19 Dec 2011, 05:38 PM
Hello,

How do you pass back to the server the event args in a OnRowResized event on the client-side?

I got it to work in a OnRowClick event by having this statement in my code behind:

 

RadGrid1.ClientSettings.EnablePostBackOnRowClick = True

RadGrid1.ClientSettings.ClientEvents.OnRowClick = "On_Row_Click"


AddHandler
RadGrid1.ItemCommand, AddressOf RadGrid1_ItemCommand

 


And in my .ASCX I have this:

 

function On_Row_Click(sender, eventArgs) {

  __doPostBack(sender.ClientID, "RowClicked:" + eventArgs.get_itemIndexHierarchical());

}

 

 

When a row is clicked, it runs the __doPostBack command above and I catch the postback on the server side in my code behind:

 

 

 

Private Sub RadGrid1_ItemCommand(sender As Object, e As GridCommandEventArgs)

   'Client-side event is caught here !!!

End Sub

 

 

 


How do I accomplish the same thing for a client-side OnRowResized event?

If anyone can give a quick response (or a working example), it would be highly appeciated.

Thanks.

3 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 19 Dec 2011, 06:12 PM
sorry by mistake
0
Accepted
Tsvetoslav
Telerik team
answered on 20 Dec 2011, 05:36 PM
Hi Jayesh,

The best way to do so is to use the ajaxRequest client-side method of the RadAjaxManager control:
http://www.telerik.com/help/aspnet-ajax/ajax-client-side-api.html
http://www.telerik.com/help/aspnet-ajax/ajax-onajaxrequest.html
http://www.telerik.com/help/aspnet-ajax/ajax-add-ajaxrequest-to-client-event.html

Hope it helps.

Regards, Tsvetoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Virgil Rodriguez
Top achievements
Rank 1
answered on 21 Dec 2011, 03:29 PM
Thank you Tsvetoslav.

I got it to work using RadAjaxManager as you suggested.

Happy Holidays to you and Telerik !!!
Tags
Grid
Asked by
Virgil Rodriguez
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Tsvetoslav
Telerik team
Virgil Rodriguez
Top achievements
Rank 1
Share this question
or