Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1440
How to Hide RecordSeparator?
posted

Hi there,

When we mark some record as fixed and putting them to the bottom of the grid, there will be a separator between the last non-fixed record and the first fixed record.  In the DataTemplate, it's a border named 'RecordSeparator'.  Is there any way to style it?  I want to change it disable all the time, or change it to a smaller height.  

I tried to override the whole DataRecordPresenter style, but somehow it's now working.  The solution I got now is using the VisualTreeHelper to find all the RecordSeparator and change the Visibility to Collapsed in code behind RecordInitialized event, but I am worry there may be performance issue.  And this is obviously not a clean solution.

 

Records,

Jason

Parents
No Data
Reply
  • 138253
    Offline posted

    Hello Jason,

     

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your issue and I suggest you use the following Style, which is the default style for the RecordSeparator and change the properties you want. You can either set its Visibility or Height Properties in order to achieve your goal.

     

    <Style x:Key="{ComponentResourceKey {x:Type igDP:XamDataGrid}, RecordSeparatorStyle}" TargetType="{x:Type Border}">
        <Setter Property="Background" Value="{DynamicResource {ComponentResourceKey {x:Type igDP:XamDataGrid}, SummaryCommandButtonsBackgroundHover}}"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="Height" Value="6"/>
        <Setter Property="BorderThickness" Value="0,1,0,1"/>
        <Setter Property="BorderBrush" Value="{DynamicResource {ComponentResourceKey {x:Type igDP:XamDataGrid}, SummaryCommandButtonsBorder}}"/>
    </Style>
    

     

    Feel free to write me if you have further questions.

Children
No Data