Hello,
Hope you are well.
I am facing a number of issues while trying to hide a list column (property) from the grid. When you run the application attached, you will find that each row is expandable. Once you expand top level row, a header for subrows will appear called 'Persons'. Now you have to expand 'Persons' again to get the list of child rows!
Try opening the source file Person.cs, and now comment out the following:
private List<string> mAnimals = new List<string>();
[Browsable(false)] public List<string> Animals { get { return mAnimals; } set { mAnimals = value; } }
Once you you comment out the non-Browsable public list 'Animals' or change its access modifier from 'public' to 'private', and run the application again, you can expand each row and display its subrows in one step. The subrows' header 'Persons' won't be appearing this time. In my case, I am trying to achieve this output without removing the list property or changing its access modifier from 'public' to something else. I am also facing other behavioural issues while having two public lists, though the browsable property of one of them is set to false.
Please help me, how can I eliminate the extra expandable header displayed each time you expand a top level row?
Another issue I am facing only while having two public lists in the Class Person, is that the expansion indicator doesn't get updated. If I add or remove children (Persons) to a Person object, the expansion indicator status doesn't update instantly, unless you click on the row. I don't face this issue while having only one public list in the Class Person. While having only one public list, whenever I remove all the children (Persons) from a Person object, the expansion indicator is hidden, and once I add a new child, the expansion indicator shows again. Please help me, how can I rectify these issues while having two public lists, and one of them is non-browsable.
Thank you.
Hello Sherif,
Thank you for your post. I have been looking into it and I modified the sample you have attached, so now it works as you want. Basically I created a Style for the ExpandableFieldRecordPresenter and added EventSetter for the Loaded event. In the handler I set its Height to 0 and its IsExpanded to true. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Hello Stefan,
Thank you for your help. Now I have managed to remove the unnecessary header for the subrows. However, I am still facing an issue with the expansion indicator. I have modified the app to simulate my issue. When you run the application, there is no expansion indicator next to 'person3' in the list because it has no children. Now, when you click on 'button', two children will be added to 'person3' in the background, but the expansion indicator will not show up. The expansion indicator will only show up if you click on 'person3'. This issue is not there, if there is only one public list in the class 'Person', i.e. if you comment out the 'Animals' list, you will not face this issue, and the expansion indicator will be notified instantly whenever there is an update. Please help me to sort out this issue.
Best regards,
Sherif
We have shipped out a new service release where your issue is resolved. I'd be glad to find out if you had tested it out and if it had met your requirements.
You can download the Service Releases by logging to our web site and going to Account \Keys & Downloads.
https://es.infragistics.com/my-account/keys-and-downloads/
Hello Stefan
Thank you. That solved my problem :)
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.