Is it possible to update a radbutton background which is on a radgrid row, without rebinding the entire radgrid?

2 posts, 1 answers
  1. Theo
    Theo avatar
    2 posts
    Member since:
    Mar 2017

    Posted 21 Apr 2017 Link to this post

    I have a radgrid that takes 20 + seconds to databind.

    Each row has a button with databound command argument

    <telerik:GridTemplateColumn DataField="EnableScript" HeaderText="EnablScript" UniqueName="EnableScript">
        <ItemTemplate>
            <telerik:RadButton ID="EnableButton" runat="server" CommandArgument='<%#Eval("EnableScript")%>' Text="Enable poller" OnClick="EnableButton_Click"/> 
        </ItemTemplate>
    </telerik:GridTemplateColumn>

    Is it possible to update the radbutton background per radgrid row, without rebinding the entire radgrid?

    Grtz,

    Theo (NL)

  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3960 posts

    Posted 24 Apr 2017 Link to this post

    Hi Theo,

    I am pasting here my reply to the ticket so it is available in the forum as well.

    You can use the client-side click to call a web service that will perform the necessary server operations and change the button appearance on the client (e.g., by adding a CSS class to its element).

    Regards,

    Marin Bratanov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 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