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
But we have a problem with one of the WebGrids. I could trace it down to the following:
In the event grid.InitializePostBack I get a data ID with
ID = Request.Form("ID")
then I get the sender webgrid:
Dim gr As WebGrid = CType(sender, WebGrid)
and filter the data:
Dim FilteredSenderRows As DataRow() = CType(gr.DataSource, DataTable).Select("ID='" & ID & "'")
Then I continue only if
If FilteredSenderRows.Length = 1 Then ...Else '(throw error)End If
but this sometimes throws an error. According to the HTTP log, the error only happens if the request goes to another server (compared to the previous call which fills the table).
Is the WebGrid caching the data somewhere else besides Session and ViewState local on one of the servers? What can be done to avoid this problem?
Thanks,
Eric
Hi Eric,
I have forwarded your issue to our development team. I will follow up them and let you for any updates. Anyway, have you read this article?Regards.Riendy
Hello Eric,
Regarding to your question about WebGrid data caching, please see our documents which titled "DataCacheStorage Property" on WebGrid Class properties.Or open our documents, then choose the following content:
Hi Riendi,
Back from vacation now. Yes, I do know the information in that article. We've set the machine key in the web.config and use session state on SQL-Server.
Hi Riendy,
Thanks for your reply. I found the documentation of the AllowAutoDataCaching property. From the documentation it does a caching of the DataSource object and is enabled per default. As all grids we use get refreshed with different data on every click, we might change this to False everywhere anyway.
But from the description it also says that the caching feature is not being used automatically and instead we should use IsDataCached property before querying for new data. We are not doing that, so I assume we don't use the caching feature anyway. Also, the description says the cached data is stored in the Session object and that is stored in SQL-Server session handler database, so it's not webserver specific.
I'm looking for some reason why the data is only on one server and not shared or not refreshed properly. So this property would not explain the problem.
Any other ideas? Any known bugs?
Regards,
First of all, I'm sorry for the latest respones.After had a discussion with a developer, you should set AllowAutoDataCaching property to false as you did to disallow auto data caching.If it is run not as expected, please ensure that you have called a dataSource in a right pattern. You have call a DataSource in OnInitializeDataSource WebGrid's event.
Please let me know if you have put it in the right state and it still not working.
Regards.Riendy
The problem on the web farm is now gone, but the application is not working anymore.
On that page we have two grids. The main WebGrid is hierarchical with dynamic loading of subnodes. We are using the recommended way (see the other thread) to load the data in InitializeDataSource. When opening a node, dynamically the data in that node will get loaded. In InitializeSelfReferenceDataSource I call e.ParentKeyValues to get the parent value and load the node data and merge it into e.DataSource with .Merge(ds.Tables(0), True, MissingSchemaAction.Error).
After turning off this AllowAutoDataCaching feature, I noticed two new problems:
a) Opening the first level nodes works, but any level deeper does not work. In InitializeSelfReferenceDataSource the data seems to get added correctly, but it just doesn't get displayed. I'm still debugging this.
b) When selecting and row in a subnode and then clicking on a row in the second WebGrid, a client-side js event gets called, which posts back by calling grdMain.SendCustomRequest. On the server-side this goes into the wg2.InitializePostBack event. There I access what was selected in the first grid: CType(grdMain.DataSource, DataTable).Select("ID="...). The problem is now that the data isn't there anymore, the row is missing. When a row in the root is being selected it works, but not if a row is selected which was added by InitializeSelfReferenceDataSource event. Before turning off the AutoCache it worked.
The problem b) is only for the server-side, on the client the folders are all there and nothing disappears. Do I have to cache this data myself somehow? Or what is the idea here?
Hi Eric,I could replicate your issue (a) on my simple sample. This issue appears only when call a data in server side. I have forwarded this issue to our development team.
For the second issue (b), it is on investigating now. Please let me know if there is another information for these issues.
I will let you know for the updates soon.
Thank you.Riendy
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