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
Webflypostback doesnt update webgrid, when initialiseculture is applied in a page. Design code
<ISWebDesktop:WebFlyPostBackManager ID="wfpmBlocks" runat="server"> <FlyPostBackSettings PostControlState="True" PostHiddenFields="True" PostInputControls="True" PostViewState="True"> </FlyPostBackSettings> </ISWebDesktop:WebFlyPostBackManager>
The vbcode applied in pageload is as follows
listener = New WebFlyPostBackListener(Me)wfpmBlocks.ServiceUrl = "PatientFileGeneral.aspx" & Request.Url.Query
Now the code for webflypostbackmanager
<WebFlyPostBackMethod()> Public Sub RebindBlockDet(ByVal blkId As String, ByVal extraUpdate As Integer) CType(divBlkCont.FindControl(blkId), Global.ASP.global_asax.INewDataBlock).BuildData() wfpmBlocks.ClientAction.UpdateViewState() Dim dataBlock As Table = divBlkCont.FindControl(blkId).FindControl("tblBlock") wfpmBlocks.ClientAction.RenderControl(dataBlock) PatFileHeader1.RebindDet() Dim patHead As Table = PatFileHeader1.FindControl("tblWarning") If (extraUpdate = 1) Then wfpmBlocks.ClientAction.RenderControl(patHead) ElseIf (extraUpdate = 2) Then For Each xBlk As String In alMainGoal CType(divBlkCont.FindControl(xBlk), Global.ASP.global_asax.INewDataBlock).BuildData() Dim xtraBlock As Table = divBlkCont.FindControl(xBlk).FindControl("tblBlock") wfpmBlocks.ClientAction.RenderControl(xtraBlock) Next End If End Sub
My page contains several webgrids created dynamically with different functionalities. in the edit mode of the page the data entered by the user is taken to either edit or delete or update the the rows in the corresponding webgrid. This functionality works fine if am not using initialiseculture event in my page. With the event applied, the asynchronous postback occurs, but the is skipped. so that am unable to get the functionality. The following is the code for initialiseculture
Protected Overrides Sub InitializeCulture() Try If Session("sesiUser") Is Nothing Then Response.Redirect("logout.aspx") End If UICulture = Session("sesLang").ToString.Trim() Thread.CurrentThread.CurrentUICulture = New CultureInfo(Session("sesLang").ToString.Trim()) Thread.CurrentThread.CurrentCulture = New CultureInfo(Session("sesCulture").ToString.Trim()) MyBase.InitializeCulture() Catch ex As Exception lblError.Visible = True lblError.Text = GetGlobalResourceObject("SYS_MSG", "wm111").ToString End Try End Sub
So what should be done inorder to make webflypostbackmanager to work when initialiseculture is used.
Hi,
Thanks for the explanation. I have tried to create a simple sample but I didn't manage to replicate the issue in here. Here I attached my simple sample, could you check the sample and inform me whether the sample works in your place or not?
Best Regards,
Gordon Tumewu
It's true, WebGrid can use global culture but our development team said that it's not best practice to use the global variable. But great to hear that the rewritten process solve the issue.
Could you describe the issue more spesific?(e.g what part of webgrid that you want to change), because if I look at your code snippet, there's no code that indicate you want to change or update the WebGrid. Also it would be helpfull if you could provide us with simple sample.
Thanks.
Well, thats all handled inside the method RebindBlockdet. In fact divBlkCont contains some dynamic grids which are updated through the method. So its not done here, and is more complex to understand and out of scope. Anyway i will generalise my question as follows.
Think as i am not doing any thing in the event say as follows.
<WebFlyPostBackMethod()> Public Sub RebindBlockDet(ByVal blkId As String, ByVal extraUpdate As Integer)Dim i as Integer=0End Sub
Then according to the working scenario of webflypostbackmanager, this method should work. In fact it works fine. I can debug through the code and access the code Dim i as integer =0.But after i put Initialise culture event inside the page, the code Dim i as Integer=0 cannot be accessed at all during the flypostback. I hope the description is clear enough.
Well, thanks for the reply the i just replaced my Initialise culture event with the one you provided. It works well. So my question is what is the current Initialiseculture has to do with mine as follows.
Thread.CurrentThread.CurrentUICulture = New CultureInfo("en")
if i use New CultureInfo("en-US") instead of New CultureInfo("en") everything works fine, but with "en" instead of "en-US" flypostback goes off. I donno why. Infact webgrid's UI is changed perfectly with just "en". Only flypostbackmanager has the problem. Anyway i may rewrite my logic according to your solution
It is because "en" is a global culture, and our products require a specific locale, not a global one. Because global culture is too general and may not be accurate. For example culture in en-UK and en-US is very different.
That's why you need to use the spesific culture. Hope this helps.
Thanks for the reply. Anyway i have rewritten my Initialiseculture and it works pretty fine. However Webgrid when done with its native postback( i mean not external postbackmanager), works fine with global culture. Thats why i asked...
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