How to disable specific DataAdapter and Database in the Designer

Stimulsoft Reports.NET discussion
Post Reply
Markus Weiß

How to disable specific DataAdapter and Database in the Designer

Post by Markus Weiß »

How can i can i disable some of the DataAdapters an Database in the designer dictionary. For example i want to disable the StiEnumerableAdapterService and the StiXmlDatabase Service using code.

Thanks for your help
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

How to disable specific DataAdapter and Database in the Designer

Post by Vital »

Please use following code:

Code: Select all

StiServiceContainer services = StiConfig.Services.GetServices(typeof(StiDataAdapterService));
foreach (StiService service in services)
{
	if (service is StiEnumerableAdapterService)service.ServiceEnabled = false;
}

services = StiConfig.Services.GetServices(typeof(StiDatabase));
foreach (StiService service in services)
{
	if (service is StiXmlDatabase)service.ServiceEnabled = false;
}
Thank you.
Markus Weiß

How to disable specific DataAdapter and Database in the Designer

Post by Markus Weiß »

Thanks for your quick and professional help.
Post Reply