Access Row of Clientside bound grid on serverside

2 posts, 0 answers
  1. Prathibarani
    Prathibarani avatar
    55 posts
    Member since:
    Mar 2013

    Posted 31 May 2018 Link to this post


    We are binding RadGrid on Client using RadClientDataSource. The grid has template columns with links. When link is clicked, we want itemcommand event to get fired on server side. Here we want to access row data and manipulate data. Since it is clientbound, we are not able to access row data. What is the best way to take care of it so that entire row data is available to us on server side.

    We used to bind the grid on server side. It was very slow. So, we switched to clientside binding which is very fast. But lot of logic happens on server side.

    I can use hidden fields and on client get values and use them. We are trying to avoid it because we use this grid on many pages and trying to come up with global solution.

  2. Eyup
    Eyup avatar
    4018 posts

    Posted 05 Jun 2018 Link to this post

    Hi Prathibarani,

    When the grid is bound on client-side, it is not possible to access this data on server-side because the data is present on the client. However, you can fire a custom command using the fireCommand method and pass a string argument holding the row data, e.g. in JSON format:

    You can check how to stringify JSON and pass it on server-side, then extract it on the code-behind in the sample provided here:

    I hope this will prove helpful.

    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top