This is a migrated thread and some comments may be shown as answers.

Grid row color

8 Answers 158 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sankardeep v
Top achievements
Rank 1
sankardeep v asked on 01 Oct 2010, 06:02 AM
Hi ,
           I am using telerik rad grid in my  Application .The main motive for using the radgrid is to implement the drag and drop row functionality , which is working great . My issue is i have given different colors to the rows on the grids  item data bound event based on some conditions , so when i select a row the color i have given to the row is over ridden by the default color of grid(when we select a row). That breaks my design because the new color doesn't completely overlaps the row it ,   i will attach a screen shot so that u can see( it looks very odd) . in screen shot the row color red which i have given is not completely over lapped by the default color of row select .

Either it must completely over lap or the color should not change . please advise 

Regards,
Sankardeep V
Associate Software Engineer
Digital Mesh Softech India (P) Limited

8 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 01 Oct 2010, 07:13 AM
Hello Sankardeep,

It seems that your screenshot is missing, but probably this will help you:

http://www.telerik.com/community/code-library/aspnet-ajax/grid/how-to-preserve-the-original-radgrid-selected-hover-row-background-when-using-itemstyle-backcolor.aspx

Note the difference between "color" (which usually is used for text color) and background color.

Kind regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
sankardeep v
Top achievements
Rank 1
answered on 01 Oct 2010, 08:54 AM
Hi Dimo,
   Sorry I forgot to attach it its attached please have a look .
0
sankardeep v
Top achievements
Rank 1
answered on 01 Oct 2010, 09:51 AM
Hi,
And also in my case the row color will be changing according to a condition .
So we cant set it as fixed . u can see my condition below .

Protected Sub TaskGridView_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles TaskGridView.ItemDataBound
        If TypeOf e.Item Is GridDataItem Then
            Dim Item As GridDataItem = DirectCast(e.Item, GridDataItem)
            Dim RowColor As TableCell = Item("Color")          'this comes from db , row color will depend on this value
            If RowColor.Text <> "" Then
                Select Case RowColor.Text                   
                    Case "blue"
                        Item.BackColor = Color.Blue
                        Exit Select
                    Case "yellow"
                        Item.BackColor = Color.Yellow
                        Exit Select
                    Case "red"
                        Item.BackColor = Color.Red
                        Exit Select
                    Case "orange"
                        Item.BackColor = Color.Orange
                        Exit Select
                    Case "green"
                        Item.BackColor = Color.Green
                        Exit Select
                End Select
            End If
        End If
End Sub
0
Dimo
Telerik team
answered on 01 Oct 2010, 10:41 AM
Hi Sankardeep,

Did you see my previous post? Everything you need is there.

Regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
sankardeep v
Top achievements
Rank 1
answered on 01 Oct 2010, 11:04 AM
i tried given it . but still its not changing
0
Dimo
Telerik team
answered on 01 Oct 2010, 11:15 AM
Hello Sankardeep,

The code library demo is for the Office2007 skin. You are using the Windows7 skin. Did you modify the example, according to the explanations provided in the screenshots?


Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
sankardeep v
Top achievements
Rank 1
answered on 01 Oct 2010, 11:39 AM
Hi Dimo ,
                    yes that was the issue i tried in window7 . changed it to office2007 and it works like a charm . Can i make it work in windows7 skin . . We are using telerik theming and is using windows & as our default theme . it would be nice if i was able
to do this with windows7 skin . Any way thanks a lot .

Regards,
Sankardeep V
Associate Software Engineer
Digital Mesh Softech India (P) Limited
0
sankardeep v
Top achievements
Rank 1
answered on 01 Oct 2010, 12:43 PM
Hi,
That was simple i got it .
Thanks

Sankardeep V
Tags
Grid
Asked by
sankardeep v
Top achievements
Rank 1
Answers by
Dimo
Telerik team
sankardeep v
Top achievements
Rank 1
Share this question
or