The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
When I'm running my QTP script, whenever i close a window and open the same window again i encounter this error:
Cannot access a disposed object. Object name: 'KeyEnabledGrid'.
This happens to most grids of class SwfObject when i do SetCurrentCell. Is there a way to handle this or to "un-dispose" the object once it is disposed?
NRNirmal Raja Syncfusion Team June 8, 2009 02:08 PM UTC
Hi,
Thank you for your interest in Syncfusion products.
Please let me know on how you close and open the window through the script, and is the issue occurs on recording? If you see the issue in replay as soon as you close and open the window, then it is caused due to the delay on QTP in retriving the swfobject which has been recreated after disposed. So to avoid it, as a workaround, you can set a delay after opening the window by calling a method called 'wait 5', which will wait until the grid swfobject has been created and then you can go for the functionality of SetCurrentCell or any methods. Please send us a sample or try to reproduce it in our shipped samples if you still face the issue.
Regards, Nirmal
KRkrishnaFebruary 9, 2010 10:16 AM UTC
Hi,
I faced the same problem.
When i access the "HPSyncgrid" for the first time,It is working fine. When i try to repeat the same operation again(in For Loop),It is is throwing an error "Can not Access a disposed object : Objec name".
I dont think it is due to the wait time.
Can we do something witht the methods IsDisposed and ISDisposing.
Thanks, Krishna
NRNirmal Raja Syncfusion Team February 11, 2010 03:37 AM UTC
Hi Krishna,
Thank you for the update.
The control gets disposed when the application is closed, it will be created when it gets opened again, the QTP extensibility source don't have any chance of disposing the control object. It depends on the application on how it has been reinitiated. The IsDisposed method can be given in the source but it will skip the replay as the object has been disposed. Please let me know if you can send me a sample as we were unable to reproduce this issue, we can analyse the issue with your sample and get a solution.