What's wrong with skins and colors

3 posts, 1 answers
  1. Filleau
    Filleau avatar
    114 posts
    Member since:
    Jun 2006

    Posted 01 Apr 2009 Link to this post

    Hi

    I'm using the lastest Q2009 release.

    Since I 've updated my project with this release I have a problem with my grid.

    I change the rows backcolor in case of a value. (normal, orange or red)

    With the latest release the backgroud column with the numeric data stay in white colors.

    See a screen here :

    http://www.berim.fr/telerik/telerik.htm



    Here my code

    Protected Sub RadGrid1_ItemDataBound1(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound
            'Is it a GridDataItem
            If (TypeOf (e.Item) Is GridDataItem) Then
                'Get the instance of the right type
                Dim dataBoundItem As GridDataItem = e.Item
                dataBoundItem.ForeColor = Color.Black
                'Check the formatting condition
                If (CType(dataBoundItem("TaillePST").Text, Double) > 1.6) And (CType(dataBoundItem("TaillePST").Text, Double) < 2) Then
                    dataBoundItem("TaillePST").Font.Bold = True
                    dataBoundItem.BackColor = System.Drawing.ColorTranslator.FromHtml("#fed687")
                    'Customize more...
                End If
                If (CType(dataBoundItem("TaillePST").Text, Double) > 2) Then
                    dataBoundItem("TaillePST").Font.Bold = True
                    dataBoundItem.BackColor = System.Drawing.ColorTranslator.FromHtml("#f8a2a2")
                    'Customize more...
                End If
                If (CType(dataBoundItem("TaillePST").Text, Double) = -1) Then
                    dataBoundItem("NomPST").ForeColor = Color.Red
                    dataBoundItem("NomPST").Font.Bold = True
                    'Customize more...
                End If
                If (CType(dataBoundItem("TaillePST").Text, Double) = -2) Then
                    dataBoundItem("NomPST").Font.Bold = True
                    dataBoundItem.BackColor = System.Drawing.ColorTranslator.FromHtml("#c3f3cd")
                    'Customize more...
                End If
            End If
        End Sub


    And the grid declation

     

    <

     

    telerik:RadGrid ID="RadGrid1" runat="server" Style="z-index: 101; left: 8px; position: absolute; top: 200px"

     

     

    Width="630px" ForeColor="Black" Skin="Default" GroupingEnabled="False">

     

    <

     

    MasterTableView CellSpacing="-1">

     

    </

     

    MasterTableView>

     

    <

     

    FilterMenu Skin="Gray" EnableTheming="True">

     

    <

     

    CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

     

    </

     

    FilterMenu>

     

     

     

     

     

    <StatusBarSettings LoadingText="Chargement..." />

     

     

     

     

     

    </telerik:RadGrid>

     

  2. Answer
    Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 01 Apr 2009 Link to this post

    Hi Filleau,

    This is a new feature of RadGrid - it shows which is the sorted column.

    You can disable it if you set  EnableSkinSortStyles="false" the RadGrid's SortingSettings.

    Best wishes,
    Dimo
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Filleau
    Filleau avatar
    114 posts
    Member since:
    Jun 2006

    Posted 03 Apr 2009 Link to this post

    Thanks.
Back to Top