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

Apply different colors to gridrow at runtime

1 Answer 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Naveen T
Top achievements
Rank 1
Naveen T asked on 22 May 2010, 08:39 AM
Hi

My scenario is I am having an assign color UI where user will define component and an color to it(I may have 40-50 components and user can set a unique color for component(so color is repeated for 2nd component) or color an be repeated  )
Ex: Component                     Color
     Sony TV                        Green
     Apple Ipad                        Blue
    Philips Razer                    Red
    Sony Blue ray                    grey
        etc
-----------------
I will bind the other data related to components to a gridview  when binding   I should set the color for each row(as defined in the above example) with respect to component.so my each row color will change depends on data.
EX:   Component            quantity         Distributor Name   Country
        Sony TV                    10                Rickey                    Aus
        Sony Blue-ray            5                    hari                        Ind
        Apple i pad                20                    greg                    UK
        Philips Blue-ray        10                    Martin                    US
etc
here i need each color for each row as the component is different

One more thing is user go to the assign color UI  can change the color of the component at any time. when he again come back to the grid page the colors need to be updated for the components


Can u please post some example and how can this be implemented

Regards
Nav


1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 26 May 2010, 08:15 AM
Hello nav kum,

What you need to do is to create a property that will contain the information about the chosen color and then to use it as a reference for the second grid with the details. You may use as a reference this blog post.
I hope that helps.

Sincerely yours,
Maya
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.
Tags
GridView
Asked by
Naveen T
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or