PDA

View Full Version : [CLOSED] how I can speed up the visualization of objects



JCarlosF
Apr 29, 2013, 5:38 PM
I have a aspx page, the objects that are displayed depend on the selected menu option

6125

I control it through the hidden attribute



Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Not Ext.Net.X.IsAjaxRequest Then
Dim report As String
Dim Opcion As String = Request("NombreOpc")

Select Case Opcion
Case "Cuotas"
report = "Cuotas"
hReport.Text = report
tipoReporte(report)
Exit Select
Case "Historial de Pagos"
report = "HistPagos"
hReport.Text = report
tipoReporte(report)
Exit Select
Case "Historial de Movimientos e Incidencias"
report = "HistMovs"
hReport.Text = report
tipoReporte(report)
Exit Select

End Select

End Sub





Sub tipoReporte(report As String)
Select Case report
Case "HistPagos"
gpAseg.Hidden = False
fcNombAseg.Hidden = False
gpRegPat.Hidden = True
fcPeriodo.Hidden = False

Exit Select

Case "HistMovs"
gpAseg.Hidden = False
gpRegPat.Hidden = True
fcNombAseg.Hidden = False
fcPeriodo.Hidden = False

Exit Select

Case "Cuotas"
fcNombAseg.Hidden = True
gpRegPat.Hidden = False
gpAseg.Hidden = True
fcPeriodo.Hidden = False

Exit Select
End Select

End Sub



in this manner, the visualization is not fast

how I can speed it up?

thanks!

Daniil
Apr 30, 2013, 5:34 AM
Hi @JCarlosF,

Please try the following.

Example (C#)

Ext.Net.X.Call("Ext.suspendLayouts");
// a bunch of updates
Ext.Net.X.Call("Ext.resumeLayouts", true);

JCarlosF
Apr 30, 2013, 3:24 PM
Hi @JCarlosF,

Please try the following.

Example (C#)

Ext.Net.X.Call("Ext.suspendLayouts");
// a bunch of updates
Ext.Net.X.Call("Ext.resumeLayouts", true);

but where I put it? put it in the load and did not work

Daniil
Apr 30, 2013, 3:33 PM
I thought you are updating the things during an AJAX (DirectEvent or DirectMethod) request.

Could you provide a sample which would reproduce the issue?

JCarlosF
Apr 30, 2013, 4:16 PM
I thought you are updating the things during an AJAX (DirectEvent or DirectMethod) request.

Could you provide a sample which would reproduce the issue?



ok, improved, thanks

Daniil
May 01, 2013, 3:37 AM
Example (C#)

Ext.Net.X.Call("Ext.suspendLayouts");
// a bunch of updates
Ext.Net.X.Call("Ext.resumeLayouts", true);

After updating from SVN you can replace it with:

Example (C#)

Ext.Net.X.SuspendLayouts()
// a bunch of updates
Ext.Net.X.ResumeLayouts(true);