Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 99250

RadGrid does not highlight row until selected twice

$
0
0
Hi Judy,

Note that the ClientSelectColumn is intended to be used for client-side selection. If you would like to have server-side selection in the Grid I would recommend to use the approach described in the following article.


Moreover, for disabling the button you can use client-side logic. Please examine the following code-snippets that illustrate the approach. Give it a try and let me know how it works for you.

<telerik:GridTemplateColumn UniqueName="TemplateColumn">
    <ItemTemplate>
        <asp:Button ID="Button1" Text="Click" runat="server" />
    </ItemTemplate>
</telerik:GridTemplateColumn>


<ClientSettings EnablePostBackOnRowClick="true">
    <ClientEvents  OnRowCreated="rowCreated" />
    <Selecting AllowRowSelect="true" />
</ClientSettings>


function rowCreated(sender, args) {
    var grid = sender;
    var dataItem = args.get_gridDataItem();
    var templateColumn = dataItem.get_cell("TemplateColumn");
    var button = $telerik.findElement(templateColumn, "Button1");
 
    if (!dataItem.get_selected()) {
        button.disabled = "disabled";
    }
     
}



Regards,
Viktor Tachev
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.

Viewing all articles
Browse latest Browse all 99250

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>