Hi Marvin,
Thank you for contacting Syncfusion Support.
We have analyzed your queries and please find the response for your queries as below,
Query |
Answer | |
I have a combobox to Filter the documents in the nested Grid by their status (an enum in my case). I just want to hide the parents rows which haven't children when i change my filter, is it possible? |
You can achieve your requirement for hiding the parent row which haven’t children by set the row height as 0 based on the records count and detailsviewdefinition count in ComboBoxSelectionChanged event,
Code Snippet [C#]:
We have also modified the sample based on this and please find the sample from the attached location: | |
I would like to know if I can hide a parent row if after filtering the grid the row hasn't any child ? After that, I would get the filtered rows count, is it possible ? |
We can not understand your query “To get the filtered rows count after hiding the row” clearly. Could you please share more information about your query? This would be more helpful for us to serve you in better way. |
Sample: http://www.syncfusion.com/downloads/support/directtrac/142249/ze/FilteringTest1562474235
Please let us know if you need further assistance.
Thank you,
Jai Ganesh S
Hi,
Thank you for the answer.
But it doesn’t solve my problems, maybe I wasn't enough specific. I will explain again what
I would like to do, maybe it would be easier to understand.
I have my SfDatagrid, that doesn't change.
I would like to show the documents only if their status matches the combobox selected Status.
I use the filterpredicate to achieve that. It works fine.
But I want to hide the rows when there are no rows in the nested grid after filtering the status.
In this picture, there is a row which hasn't documents with the "Sent" status.
My questions are :
-How can I determine if my parent's row has some filtered children (documents with the same status as my combobox selected status) ? And if I can get those children ?
I saw a "ChildViews" property on the RecordEntry, but it was often null even if my row has some children.
-How can I hide the childless rows when I change my filter, so hiding when there are no children with the same status as the combobox selected status ? (And doing it every time I change the filter)
And I have a question on your solution
-In your snippet, you are hidding all the lines, not only the childless ones, and I don't understand why
var rowCount = (recordsCount * detailsviewdefinitionCount) + recordsCount;
Because in my sample, if I look on vc.RowHeights.LineCount, I get 21 and rowCount = 20, maybe is the grid header included in that count ?
It would say that RowHeights only counts the parents' rows and the header of each detailViewDefinition and not the detailViewRow count ?
I don't attach my sample again, this is the same, I just change the data to take the screenshots.
I hope I can help you better to understand my questions. And sorry for asking again.
Best regards,
Marvin.
Hi Martin,
Thank you for the update
We analyzed your query. A support incident to track the status of this query has been created under your account. Please log on to our support website to check for further updates
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Please let me know if you have any questions.
Thank you,
Jai Ganesh S