How to hide rows when DetailsViewDefinition is enabled

Hi,

I'm solving another problem now with hiding rows based on some condition when DetailsDefinition is enabled.

According our communication in this thread: https://www.syncfusion.com/forums/139478/rowdetailstemplate-alternative-in-sfdatagrid "QueryRowHeight"is not fired.

So how can I hide rows based on some condition? I checked https://www.syncfusion.com/kb/3191/how-to-hide-the-rows-based-on-condition-in-sfdatagrid but theres is only way with using QueryRowHeight event.

I also tried to udpate RowStyle (which I'm using to style my rows) TargetType="{x:Type syncfusion:VirtualizingCellsControl}" by using converter and setting visibility to collapsed. Not working. I also tried to set Height to 0 for cells but I had black rows instead of 0 height rows.

I really don't know what else I should try.

Thanks for any advice.

Best regards,
Peter

3 Replies

DY Deivaselvan Y Syncfusion Team September 14, 2018 10:20 AM UTC

Hi Peter,

We regret for the inconvenience caused.

Your requirement to hide the row can be achieved by setting RowHeight as Zero in the QueryRowHeight event only. But as we specified earlier in the forum #139478, this event will not be fired when the DataGrid has DetailsViewDefinition. We have already logged feature report to provide support to trigger QueryRowHeight event to do customization for the row height when it has DetailsViewDefinition. We will let you know once this feature has been implemented in any of our upcoming releases.

Regards,
Deivaselvan 



PV Peter Verbo September 14, 2018 10:45 AM UTC

Hi Deivaselvan,

is it possible to perform sorting and filtering of rows by using of CollectionViewSource? Because it can fix my problem but I have issue with it as described in my another thread: https://www.syncfusion.com/forums/139813/sorting-not-working-with-collectionviewsource

Thanks,
Peter


DY Deivaselvan Y Syncfusion Team September 17, 2018 06:52 AM UTC

Hi Peter,

You can achieve the Sorting and Filtering operation in SfDataGrid using the options available in SfDataGrid control and you can’t get it done with the CollectionViewSource for the data operations. We have provided the requested details in the forum #139813 to meet your requirement and you can follow the forum #139813 for further updates.

Regards,
Deivaselvan 


Loader.
Up arrow icon