Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1010
Populate a Resource object
posted

I need to write some C# code-behind to remove a resource.  There is a .RemoveResource method on the WebScheduleDataProvider, but it requires a populated Resource object. 

I have the resourceName, how do I populate a Resource object?

There is a protected RemoveResource that accepts a RemoveResourceContext object, where I can set a resourceName.  That would be perfect, except that it is PROTECTED and I can't call it.

So it looks like I need to fetch ALL the resources in my entire system (using WebScheduleDataProvider.FetchResources) then loop through them until I find the one I want, then pass that to the RemoveResource(resource) method?  Eventually we might have 50,000 resources, that's just not a good idea is it?

 

Am I missing something or did Infragistics miss somehting?

 

This is a time-sensitive problem, can someone from IG please help me out ASAP?  Even if it is just to verify the bulky solution I described above...