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
725
Scroll viewer not working well when datarecordpresenter height set to zero
posted

Hi 

I have an issue in scrolling when binding records to xamdatagrid.

I need to hide row on dataitem, and that i did, I set height to 0 to datarecord presenter.

<Style x:Key="dataRecordPresenter" TargetType="{x:Type igDP:DataRecordPresenter}">
 <Style.Triggers>
  <DataTrigger Binding="{Binding Path=DataItem.IsVisible}" Value="False">
   <Setter Property="Height" Value="0"/>
  </DataTrigger>
 </Style.Triggers>
</Style>

But i got issue in scrolling.When i scroll it consider all collection having height 0. So scroll viewer is not working proper for me.

Here i attached sample application. i have 1000 records in collection but display only some record. So when scroll it shows in scroll bar tooltip and count all records.

I dosent need of that datarecord presenter so is there any event from where i get DataItem.IsVisible and remove datarecord presenter when loading and when any new record add in collection.

Thank you 

Adit 

DataGridPresenterScrolling.zip