Hi
Usually when a record is selected via the record selector the background of the whole row gets changed and additionally a border is shown. I've retemplated the record selector to add a button next to it. Currently when i click that new button only the border is shown and also when the selection (via record selector) changes by clicking the new button the border changes to the new selection but the background not (stays in the old selection). How to fix this?
HI, Can you provide a small isolated sample that replicates this issue?
Sincerely, Matt Developer Support Engineer
Attached is the sample application.
To replicate the issue, click once on the first recordselector then click the button on the next row.
Hi Matt
Sorry for the late response. I've tried your solution and it works but only (as you stated) if SelectTypeRecord is set to single. However i would like to have a solution for multiple selection, the same default behaviour of xamdatagrid.
HI,
I am following up on this forum thread. If you need further assistance, please let me know.
I made a few changes to your Xaml and Code Behind files.
I set the FieldLayoutSettings' SelectTypeRecord to single.
I wired up the Button Click event for your custom button.
I added the following code in that event.
private void customButtom_Click(object sender, RoutedEventArgs e) { Button btn = (Button)sender; if (btn.DataContext is Record) { // int i = 0; Record r = btn.DataContext as Record; r.IsSelected = true; }
}
I am attaching a sample project.
Sincerely. Matt Developer Support Engineer