Completed
Last Updated: 24 Jun 2022 11:21 by ADMIN
ADMIN
Marin Bratanov
Created on: 16 Jul 2018 12:16
Category: Grid
Type: Bug Report
0
Selected RadCheckbox in a selected row in a grid blends with the background in BlackMetroTouch, Bootstrap, Glow, Metro, MetroTouch, Office2010Black, Telerik, WebBlue skins
It becomes hard to see the checked checkboxes because of the selected color it has by default matches the select color of the grid

Solution:

        .RadGrid_BlackMetroTouch .rgSelectedRow .RadCheckBox.RadButton_BlackMetroTouch .rbToggleCheckboxChecked::before,
        .RadGrid_Bootstrap .rgSelectedRow .RadCheckBox.RadButton_Bootstrap .rbToggleCheckboxChecked::before,
        .RadGrid_Metro .rgSelectedRow .RadCheckBox.RadButton_Metro .rbToggleCheckboxChecked::before,
        .RadGrid_MetroTouch .rgSelectedRow .RadCheckBox.RadButton_MetroTouch .rbToggleCheckboxChecked::before {
            color: white;
        }

        .RadGrid_Glow .rgSelectedRow .RadCheckBox.RadButton_Glow .rbToggleCheckboxChecked::before,
        .RadGrid_Office2010Black .rgSelectedRow .RadCheckBox.RadButton_Office2010Black .rbToggleCheckboxChecked::before,
        .RadGrid_Telerik .rgSelectedRow .RadCheckBox.RadButton_Telerik .rbToggleCheckboxChecked::before,
        .RadGrid_WebBlue .rgSelectedRow .RadCheckBox.RadButton_WebBlue .rbToggleCheckboxChecked::before {
            color: black;
        }

Sample to reproduce the behavior and compare the default colors in other states/cases:

        <telerik:RadCheckBox runat="server" ID="rcb1"></telerik:RadCheckBox>
        <br />
        <telerik:RadCheckBox runat="server" ID="rcb2" Checked="true"></telerik:RadCheckBox>
        <telerik:RadSkinManager runat="server" ID="RadSkinManager1" Skin="Bootstrap" ShowChooser="true">
        </telerik:RadSkinManager>
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" RenderMode="Lightweight" />
        <asp:CheckBox ID="Checkbox1" Text="some checkbox" runat="server" />
        <telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" RenderMode="Lightweight">
            <MasterTableView>
                <Columns>
                    <telerik:GridClientSelectColumn></telerik:GridClientSelectColumn>
                    <telerik:GridTemplateColumn HeaderText="rad check box column">
                        <ItemTemplate>
                            <telerik:RadCheckBox runat="server" ID="RadCheckBox1"></telerik:RadCheckBox>
                            <br />
                            <telerik:RadCheckBox runat="server" ID="RadCheckBox2" Checked="true"></telerik:RadCheckBox>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings>
                <Selecting AllowRowSelect="true" />
            </ClientSettings>
        </telerik:RadGrid>

And a dummy data source that is not a good data source in general, but it will suffice to get this running so one can observe

    protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        (sender as RadGrid).DataSource = "abcdef";
    }
0 comments