Syncfusion Demo Question: Show all bank objects in ObservableCollection on the propertygrid
Hi,
I am looking at the syncfusion propertygrid demo. I have looked at several examples, but cannot find an example that matches my query.
I have made one change to the demo, to the Person model I added
a property
[CategoryAttribute("ListDemo")]
[Display(Description = "List Test", Order = 9, Name = "Customer bank accounts", GroupName = "ListDemo")]
public ObservableCollection<Bank> Banks
{
get;
set;
}
[Display(Description = "List Test", Order = 9, Name = "Customer bank accounts", GroupName = "ListDemo")]
public ObservableCollection<Bank> Banks
{
get;
set;
}
and to the constructor
Banks = new ObservableCollection<Bank> { new Bank(name:"Centura Banks", accountNumber:00987453721, customerId:"carljohnson", passWord:"nuttertools"),
new Bank(name:"City Bank", accountNumber:00123456789, customerId:"johnk", passWord:"helloworld")};
new Bank(name:"City Bank", accountNumber:00123456789, customerId:"johnk", passWord:"helloworld")};
The result compiles and I get a new Category called List Demo in the propertygrid. In that category I see a property called Customer bank accounts, but when I expand that property, I only see that there are 2 models - but the properties of those models are not accessible.
Is there a way to list the bank models with accessible properties under the category List Demo. It should not be assumed that it is known how many items the ObservableCollection collection holds. And how would I best handle a null - for example there is no bank account for that person on file? Would at also be possible to add or delete a bank model to/from the ObservableCollection holding the bank models at runtime?
Kind regards,
Niels van Strien
Attachment: PropertyGridDemo_c41d0bb3.7z
SIGN IN To post a reply.
3 Replies
AI
Anirudhan Iyyappan
Syncfusion Team
June 8, 2020 10:31 AM UTC
Hi NM van Strien,
Thank you for contacting Syncfusion support.
Currently, we are not having the support to add or delete a model class from the Observable Collection class at runtime. We have checked your query and logged it as feature request and it will be included in our upcoming releases. Please refer the feedback portal link below.
Feedback Link: https://www.syncfusion.com/feedback/11516/need-to-provide-support-for-list-type-property-in-propertygrid
Regards,
Anirudhan
NV
NM van Strien
June 8, 2020 10:58 AM UTC
Hi Anirudhan,
That would be awesome!
I understand that adding and deleting from the observable collection is not a feature yet - but I also had trouble listing all existing objects in the observable collection, with their properties. Is that possible already, or is that also a feature request? If it is possible already - how do I achieve that? I my demo, I can just see that there 2 objects in my observable collection, but cannot access the properties of those objects.
Kind regards,
Niels
AI
Anirudhan Iyyappan
Syncfusion Team
June 9, 2020 08:55 AM UTC
Hi NM van Strien,
Thanks for your update.
The reported query is also been mentioned in the feature request.
Regards,
Anirudhan
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
NV NM van Strien
- Jun 5, 2020 03:26 PM UTC
- Jun 9, 2020 08:55 AM UTC