I've tried looking on here for a solution but how do you highlight the first row in search results?
<igDP:XamDataGrid Margin="2" Theme="LunaSilver" DataSource="{Binding Documents}" Grid.Row="2" GroupByAreaLocation="None" ActiveDataItem="{Binding SelectedObject}" ScrollingMode="Immediate"> <igDP:XamDataGrid.InputBindings> <MouseBinding MouseAction="LeftDoubleClick" Command="{StaticResource EditCommand}"/> </igDP:XamDataGrid.InputBindings> <igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings SelectionTypeRecord="Single" AutoGenerateFields="False" ExpansionIndicatorDisplayMode="CheckOnDisplay" FixedFieldUIType="None" AllowFieldMoving="No"/> </igDP:XamDataGrid.FieldLayoutSettings> <igDP:XamDataGrid.FieldSettings> <igDP:FieldSettings AllowSummaries="False" SummaryUIType="SingleSelect" LabelTextAlignment="Center" AllowEdit="False" CellValuePresenterStyle="{StaticResource CellValuePresenter}" FilterEvaluationTrigger="OnEnterKeyOrLeaveCell" /> </igDP:XamDataGrid.FieldSettings>
Hello Brooke,
You can use the GetFilteredInDataRecords method to get all records passing the condition, and then you can change the background of the first record of the returned collection
DataRecordPresenter.FromRecord(firstRecord).Background = Brushes.Green;
Should you have any further questions, please let me know.
Sincerely,
Tihomir TonevAssociate Software DeveloperInfragistics
There isn't a way to do this in the xaml page?
Hello,
Currently there is no property of the grid/record that is used to determine if a row is first when filtered. You could style the Record background, however you will still need some code behind to provide a property to bind the data trigger to.
If you are looking to do this exclusively in XAML, you can submit a feature request on our website here:
https://www.infragistics.com/community/ideas
Should you have any other questions, please let me know.