Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6871725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:50:25+00:00 2026-05-27T03:50:25+00:00

I have created a search tab and by giving different inputs i am listing

  • 0

I have created a search tab and by giving different inputs i am listing search objects in my datagrid. I want to color each row wrt to its type e.g For Admin Red color or red text is displayed in respected datagrid row. How can i do that , atm i am using this code for creating datagrid.

<mx:DataGrid x="170" y="10" height="238" width="318" dataProvider="{userContacts}" id="contactsGridView">
        <mx:columns>
            <mx:DataGridColumn width="80" headerText="Username" dataField="username"/>
            <mx:DataGridColumn width="80" headerText="First Name" dataField="firstName"/>
            <mx:DataGridColumn width="80" headerText="Last Name" dataField="lastName"/>
            <mx:DataGridColumn  headerText="Type" dataField="type">
                <mx:itemRenderer>
                    <fx:Component>
                        <mx:VBox>
                            <mx:Text width="100%" text="{(data.type == 1)? 'Admin':((data.type == 2)? 'Doctor': ((data.type == 4)? 'Patient' : ((data.type == 3)? 'Nurse':((data.type == 5)? 'Professional':((data.type == 6)? 'Loved One': 'Unknown')))))}"/>
                        </mx:VBox>
                    </fx:Component>
                </mx:itemRenderer>
            </mx:DataGridColumn>
        </mx:columns>
    </mx:DataGrid>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:50:26+00:00Added an answer on May 27, 2026 at 3:50 am

    Its easy to apply style using the setStyle() function.
    apply the same color for alternating Item colors and also the header color.
    during the search string is null or empty set the default color using the
    same setStyle() propety.

    for further reference Click Here for the Style Explorer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good Morning, I have created an ASP.NET 3.5 webform that allows users to search
I have a bunch of annotated, interrelated POJOs that I want to create/modify/search over
within a ascx (usercontrol) I have a created a tab section which contains a
I have created a search form with get method. But when the url looks
I have created a method where I can search for string placeholders, this I
I have created a form in my application as follows: <form action=/search/ method=get> <input
I have created a Android application using Google Maps. Now I want to check
I have created a BST full of WordInfo objects that have a vector to
I'm using ASP.NET with C# 2.0. I have created some objects for a database
I have created a binary search tree with {2,5,3,4,9,1,7,...,100} digits. how can i save

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.