Performance issue due to form datasource active method.

Hi,

I have a form where I have lot of datasources attached to it.In one datasource active method I have lot of code for enabling\disabling, editing\non-editing of controls.(More than 50 controls are being handled here).Due to this the system is taking maximum time to traverse from one record to another.

Could anyone please suggest me the best way to handle this situation.

Thanks in Advance!

Sindhu

All the controls might not exist in a same grid/group/tabpage, so you can probably split up the code into relevant events(example controls in tab pages can be controlled in the pageActivated event)

I also suspect you might be fetching the some data(from database) in order to enable/disable these controls, If so try optimize the queries.