How to change image url inside rad girdview in client side on row click

1 posts, 0 answers
  1. Aravind
    Aravind avatar
    41 posts
    Member since:
    Jun 2013

    Posted 22 Apr 2016 Link to this post


      I am using rad grid view with template column,inside template column i add asp image control ,by default in design time it bind the one image,when user click the row,i need to change image url ,so in client side itself it change image.

    This is rad grid design code
            <telerik:RadGrid ID="ResultGrid" AllowPaging="true" PageSize="75" AllowSorting="true"
                                    AllowFilteringByColumn="true" AllowMultiRowSelection="true" AutoGenerateColumns="false"
                                    ClientSettings-Resizing-AllowColumnResize="true" ClientSettings-ClientEvents-OnRowContextMenu="ResultGrid_OnRowContextMenu"
                                    <PagerStyle Visible="false" />
                                    <MasterTableView AllowAutomaticUpdates="true" ClientDataKeyNames="Database">
                                            <telerik:GridBoundColumn ReadOnly="true" ItemStyle-CssClass="GridCellSpace" HeaderText="Database"
                                                UniqueName="Database" DataField="Database">

                                            <telerik:GridTemplateColumn AllowFiltering="false" HeaderStyle-Width="3%" ReadOnly="true"
                                                HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" UniqueName="Preview"
                                                    <asp:Image ID="Image2" ImageUrl= "~/image/AdminImages/btn_search.png" runat="server" />
                                        <ItemStyle HorizontalAlign="Left" />
                                        <HeaderStyle HorizontalAlign="Left" />



    Here Image2 point to "~/image/AdminImages/btn_search.png",so once user click the row i need to change clicked row image url to "~/image/AdminImages/btn_got.png"  in client side itslef



Back to Top