Hello.
I'm back with more questions and problems.
- When inserting new row into master grid (master/child scenario), new row is out of alignment with other rows. This is clearly a bug?
- When cell in grid has focus, routed commands (trigerred through button in a toolbar) get selected GridViewCell as ExecutedRoutedEventArgs.OriginalSource. When only row has focus (row is selected but no cell has focus) nothing (button itself) is returned as OriginalSource. Shouldn't selected GridViewRow be passed in OriginalSource?
- 4. After adding new record to child grid (in a way explained here here), that new row is immediately removed. I add record to database (LINQ) in RowEditEnded, so after restarting an application record does show. The cause seems to be RadGrid not inserting data into underlying LINQ container. This does not happen in master grid. Child grid ItemsSource is set to "{Binding MasterRecord.Data.Addresses}". Addresses is a property of class EntitySet. The workaround is adding new record manually into this collection, which works fine, but I'd like to know this this is the way it's supposed to be or is it some kind of bug (my code or RadGrid doing something wrong).
- I'm using binding validation (based on IDataErrorInfo implemented in business objects). I have problems marking cells that have validation errors. Setting Validation.ErrorTemplate has more or less unpredictable results. So I use code like this:
<Style TargetType="{x:Type telerik:GridViewCell}"> <Style.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}" /> <Setter Property="Background" Value="Red" /> </Trigger> </Style.Triggers> </Style>
- This leaves misaligned red borders (where inserted cells were marked red for validation errors) in first row even after row has been commited and moved. This remains in place event when scrolling grid. It works fine for row's that were already in database or were only modified, but not for new rows.
- Red background does not show for fields containging date.
Thanks.
Branko