In this blog, we will learn how to change the colour of selected record of the Grid.
We have a requirement where there is a Grid of CDS Data Source, on clicking any record, it should get highlighted.
- There is a Screen on which there a Editable grid of custom Entity Objective.
- To Create an Editable Grid refer to the following link. https://www.cloudfronts.com/create-an-editable-grid-view-in-powerapps/
- To add Lookup Fields in the Grid refer to the following link. https://www.cloudfronts.com/add-lookup-fields-in-an-editable-grid-using-powerapps/
- This is the grid without highlighting any record.
- To change the colour of selected records, update the TemplateFill Property:
TemplateFill property of the Deactivate Button: Set Gallery.TemplateFill = If( <Guid of record> = <Selected Record GUID>, Color, Color ) For eg: BrowseGalleryObjectives.TemplateFill= If( Objective = BrowseGalleryObjectives.Selected.Objective, RGBA(220, 231, 238, 1), RGBA(0,0,0,0) )
- This is the grid with highlighting record.
Hope above Blog helps you change the colour of selected record of the Grid.