Hello,
I have an entity called
HouseholdBusiness which is related to
Person (1-many people belong to a HouseholdBusiness). The PersonGridView includes some related columns from HouseholdBusiness:
AddId(descriptors.PersonGUID, "ID"); AddNameReadOnly(descriptors.FirstName, "First"); AddNameReadOnly(descriptors.MiddleName, "Middle"); AddNameReadOnly(descriptors.LastName, "Last"); AddNameReadOnly(descriptors.Title, "Title"); AddNameReadOnly(descriptors.HouseholdBusiness.HBType.HBType, "Type"); AddNameReadOnly(descriptors.HouseholdBusiness.HBName, "House/Biz"); AddNameReadOnly(descriptors.HouseholdBusiness.City, "City"); AddNameReadOnly(descriptors.HouseholdBusiness.State, "State"); AddNameReadOnly(descriptors.HouseholdBusiness.Country, "Country");
|
The AllPeopleSearcher uses only the actual Person properties for searching:
public AllPeopleSearcher() : base() { SetContainsQueryTextColumns( Person.LastNameEntityColumn , Person.FirstNameEntityColumn , Person.MiddleNameEntityColumn , Person.TitleEntityColumn ); }
|
I would like to use a visual cue so the user knows they are only searching certain types of data, though the other data is displayed. I thought a column color for the searched fields would be good, but am unsure how to implement this.
The DevExpress website has a code example for coloring a column:
gridView1.Columns["UnitPrice"].AppearanceCell.BackColor = Color.LightSteelBlue; gridView1.Columns["UnitPrice"].AppearanceCell.BackColor2 = Color.Azure; gridView1.Columns["UnitPrice"].AppearanceCell.ForeColor = Color.Black;
|
But since this is CAB, I don't have a direct reference to the gridview here. How/where can I implement code to achieve this result?
Thanks!
Heather