iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I have a webgrid on my page in a web dialog box. The page also has a few hyperlinks on it and whenever you click on a hyperlink the web dialog box will be shown and the web grid will be populated with data via the RefreshAll() client side function.
The situation I have is that if you click one hyperlink, the dialog box and the grid will be shown with the correct data. If you then click a second hyperlink the dialog box and grid are shown again but in the grid you can still see the data from the previous instance of the grid before it gets refreshed to the correct data.
My question is how can I get the grid to clear all its data before the web dialog box is shown and still have RefreshAll() called after the the ShowDialog() method is called so the user can see that the grid is loading data without actually seeing the old data? I need to be able to do this from the client side. Can it be done directly from the client or do i nedd to call something that will invoke a server side event?
So, you wanted to avoid the previous stucture to be showed while it takes sometimes to refresh the new structure, correct?It's true that the possible way to have the new structure is before dialog shows up. The workaround is easy. Try to delay ShowDialog() method.
e.g
function doChange(obj) { var grid = wgGetGridById("WebGrid1"); var dlg = ISGetObject("WebDialogBox1"); document.all["tableName"].value = obj.value; grid.RefreshAll(); window.setTimeout(function() { dlg.ShowDialog(); }, 500); }
Hope this helps. :-)
Regards,Handy
Hi Mark,
It seems you are missing 'ClearCahceDataSource' method. With this method, all the previous instance data cache should be removed. I made a simple sample but it did not represent all of your scenario. In fact, i used button instead of hyperlink to show WebDialogBox. Hope this helps.
Hi Handy, thanks for the reply. I have modified your sample to illustrate what I am experiencing.
When the page loads please select an option from the drop down list and the web dialog box will open with the grid inside. Close the dialog box and then select a different option from the drop down list. The web dialog box will open again and before the correct table structure is applied to the grid you will see the previous structure and data that was in the grid. I need to be able to stop that from happening.
Correct, however I want the dialog box to be shown before the grid is refreshed, so that the user can see that the grid is loading in case it takes some time to retrieve the data. Is this possible?
I think it is a little hard to find the perfect timing to do that. You only can choose between two conditions you knew.
Regards,HAndy
Hi Handy, I have gone with the implementation of using a timeout to delay the ShowDialog() method. Although it is not exactly the functionality I wanted, it is pretty close. Thanks for your suggestions.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname