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
Hello Adit,
Thank you for your post. I have been looking into it and the sample you have attached and I modified it so now it works as you want. Basically instead of using Style for the DataRecordPresenter, I set a filter condition to the FieldLayout which has the same logic as the Trigger you used.
Looking forward for your reply.
Hi Stefan,
Thanks for your replay.Its working right now.I am going to test deeply with other cases.
Thanks
Adit Sheth
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
I am integrate this code with my other code.In that i am using this IsVisible flag in the child level too,So when i am applying same filtering into 2nd level its wont work. It work in the case when set height to 0,but in that case scrolling issue continue.So my question is that how to apply filter in second level.
Here i attached sample code.Let me know what can i do to resolve this case... I have 3 level in that grid and also same case i have to do in third level also.
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Thanks Stefen,
Its working