Using RowDataBound event on the server side

2 posts, 0 answers
  1. Bill
    Bill avatar
    175 posts
    Member since:
    Apr 2010

    Posted 07 Jul 2013 Link to this post

    I want to retrieve some data for a grid via client-side pagemethods via the following:

    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.
  2. Antonio Stoilkov
    Antonio Stoilkov avatar
    530 posts

    Posted 11 Jul 2013 Link to this post


    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.

    Antonio Stoilkov
    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.
Back to Top