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

Using RowDataBound event on the server side

1 Answer 170 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 2
Bill asked on 07 Jul 2013, 08:03 PM
I want to retrieve some data for a grid via client-side pagemethods via the following:
http://www.telerik.com/help/aspnet-ajax/grid-client-side-binding.html

After executing the checkbox2 clicked event, a "GetData" pagemethod is executed to retrieve results for the grid in the updategrid function.

After the results come back, instead of performing the clientside rowdatabound event, if I have a corresponding event set up on the grid at design time to execute it via server side, will it go ahead and perform that server side rowdatabound event.

Thing is getting data may be expensive depending on when you do it. If I can get the data in certain situations via a page method, I can let the server side rowdatabound event handle each row coming through and apply what is needed.

Or will it be a lot faster leaving it client side. If that's the case, why have any server side programming to begin with if it's going to take a lot longer? Do we need to do everything client side?

The above I assume would simulate CallBack events similar to what DevExpress has, I don't see any CallBack events with the Telerik controls other than this type of programming.

Any feedback would be much appreciated.

1 Answer, 1 is accepted

Sort by
0
Antonio Stoilkov
Telerik team
answered on 11 Jul 2013, 08:08 AM
Hi,

In your scenario I would recommend using only client-side code for working with items and subscribing to RadGrid OnRowDataBound client-side event. Additionally, deciding whether to use server-side binding or client-side binding depends on a project requirements. Server-side binding is faster when retrieving huge amounts of data or performing heavy CPU intensive calculations. Client-side binding is perfect for retrieving data from web service and showing live data as shown in the demo below. Note that in your case the client-side approach should be faster then going with the server-side binding.

Regards,
Antonio Stoilkov
Telerik
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 the blog feed now.
Tags
Grid
Asked by
Bill
Top achievements
Rank 2
Answers by
Antonio Stoilkov
Telerik team
Share this question
or