Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I get DataConnector to use an IList for a data source?

Data ilist source
0
Posted

How do I get DataConnector to use an IList for a data source?

0

How do I get DataConnector to use an IList for a data source? I’m trying to get a DataConnector component to recognize that my data source implements IList. According to the documentation, it should then use this implementation instead of its own…

0

I’m trying to get a DataConnector component to recognize that my data source implements IList. According to the documentation, it should then use this implementation instead of its own list. I’ve tried inheriting from ArrayList and List, but the DataConnector wraps my list implementation inside its own list. As a result, the Add and AddNew methods accept and return MyItemCollection objects, instead of the MyItem. DataConnector always wraps the internal list. Calls to DataConnector.Add will call the wrapped list’s Add method (which takes an object and returns an int – not quite what you said). If the wrapped list is an IBindingList, then calls to DataConnector.AddNew will call the wrapped list’s AddNew. If the underlying list is not an IBindingList, then calls to DataConnector.AddNew will try to create a new instance of the item type contained in the underlying list (in your case, this would be MyItem) and add that item to the list. You can override the AddNew behavior of the Da

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123