How to set color of the Row, When check Box is selected In RadGrid.

3 posts, 0 answers
  1. Sairam
    Sairam avatar
    56 posts
    Member since:
    May 2013

    Posted 14 May 2013 Link to this post

     <telerik:GridTemplateColumn UniqueName="BankType" AllowFiltering="false" EditFormHeaderTextFormat=" ">
                            <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="Fieldset"
                                Skin="Outlook" />
                            <div style="height: 150px; width: 142px; float: left; margin-left: -20px; margin-bottom: 20px;
                                border: rgb(102,102,102) solid 1px; border-radius: 8px; padding: 0px 0px 0px 5px;
                                font-family: Bold; font-size: 12px; position: relative; bottom: 100px; top: 10px;
                                left: 20px;">
                                <span style="font-weight: normal; font-family: Verdana; background-color: rgb(215,230,255);
                                    font-weight: normal; margin-top: 4px; left: 10px; position: relative; top: -10px;">
                                    &nbsp;Bank Type</span>
                                <telerik:RadGrid ID="RgList1" runat="server" AutoGenerateColumns="false" ShowHeader="false"  CssClass="RgListPosition1" >
                                    <MasterTableView AutoGenerateColumns="false">
                                            <telerik:GridTemplateColumn HeaderText="BankTypeName">
                                                    <%# Eval("BankTypeName")%>
                                            <telerik:GridTemplateColumn UniqueName="chkBankList1" HeaderText="Select">
                                                    <asp:CheckBox ID="chkBankTypeName" runat="server" />
                                    <ClientSettings EnableRowHoverStyle="false"></ClientSettings>

    The Above code inside another grid ....when user select the inner grid checked box ,I  want to set some " css class color" to the row .
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 14 May 2013 Link to this post


    Please try the following code snippet to change the color of the row on CheckBox CheckChanged event.

    protected void chkBankTypeName_CheckedChanged(object sender, EventArgs e)
        CheckBox chk = (CheckBox)sender;
        GridDataItem ditem = (GridDataItem)chk.NamingContainer;
        ditem.BackColor = Color.Red;

  3. Sairam
    Sairam avatar
    56 posts
    Member since:
    May 2013

    Posted 14 May 2013 Link to this post

    Thanks Princy,but  I need solution in clients -side ,  not  at server-side.can your help in it.Unfortunately code is not working ...When user checks on check box ,I want  show  checked row color changes to "blue".  
Back to Top