| private void GenerarGrilla() |
| { |
| List<string> dataKeyNamesList = new List<string>(); |
| radgridResultados.AutoGenerateColumns = false; |
| radgridResultados.Visible = true; |
| foreach (ConfiguracionUI.Campo campo in form.Grilla.Campos) |
| { |
| GridBoundColumn boundColumn; |
| boundColumn = new GridBoundColumn(); |
| boundColumn.DataField = campo.Key; |
| boundColumn.HeaderText = campo.Name; |
| boundColumn.Visible = campo.Visible; |
| radgridResultados.MasterTableView.Columns.Add(boundColumn); |
| if (campo.IsdataKey == true) |
| dataKeyNamesList.Add(campo.Key); |
| } |
| string[] dataKeyNames = new string[dataKeyNamesList.Count]; |
| dataKeyNamesList.CopyTo(dataKeyNames); |
| radgridResultados.MasterTableView.DataKeyNames = dataKeyNames; |
| radgridResultados.AllowSorting = false; |
| radgridResultados.AutoGenerateColumns = false; |
| } |
| private void GenerarDetalle(GridTableView tableViewOrders) |
| { |
| radgridResultados.MasterTableView.DetailTables.Add(tableViewOrders); |
| foreach (ConfiguracionUI.Campo campoDetalle in form.Grilla.Detalle) |
| { |
| GridBoundColumn boundColumn; |
| GridHyperLinkColumn linkImagen; |
| if (campoDetalle.ColumnType != null) |
| { |
| linkImagen = new GridHyperLinkColumn(); |
| //linkImagen.DataNavigateUrlFields = campoDetalle.Key; |
| linkImagen.HeaderText = campoDetalle.Name; |
| linkImagen.Text = "Ver Imagen"; |
| linkImagen.NavigateUrl = "javascript:ShowMessage('imagen.aspx?&C={0}&R={1}&P={2}&I=True')"; |
| tableViewOrders.Columns.Add(linkImagen); |
| } |
| else |
| { |
| boundColumn = new GridBoundColumn(); |
| boundColumn.DataField = campoDetalle.Key; |
| boundColumn.HeaderText = campoDetalle.Name; |
| tableViewOrders.Columns.Add(boundColumn); |
| } |
| } |
| } |

protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
RadProgressArea.Localization.UploadedFiles = "Directories Processed: ";
RadProgressArea.Localization.CurrentFileName = "Current Directory: ";
RadProgressArea.Localization.TotalFiles = "Directories Found: ";
RadProgressArea.Localization.TransferSpeed = "Files Processes: ";
if (Request["websiteMasterID"] == string.Empty)
Response.Redirect("~/SessionTimeOut.aspx", true);
else
{
try
{
_websiteMasterID = int.Parse(Request["websiteMasterID"]);
CrawlWebsite(_websiteMasterID);
}
catch (Exception _ex)
{
Response.Redirect("~/SessionTimeOut.aspx", true);
}
}
}
}
private void CrawlWebsite(int _websiteMasterID)
{
//stuff
}
Basically, when the page is called it grabs the webisite ID from the query string and then processes the files for that website. While this is going on, I would like the progress information to be displayed.
I have this working if I click on a link on the page, and it does the post back. Then I can see the progress information, so the progress bar is working.
However, when i try to do it on the page_load, then the previous screen stayes in the browser; You see that the page is doing something because of the disc activity; then it loads the rest of the page information. It doesn't show the progress.
Any suggestions?
| <script type="text/javascript"> |
| function OpenWindow() |
| { |
| var wnd = window.radopen("http://www.google.com", null); |
| wnd.setSize(400,400); |
| return false; |
| } |
| </script> |
| <button onclick="return OpenWindow()" id="button2">Open with radopen</button> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" |
| EnablePageHeadUpdate="False" EnableViewState="False"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="ddState"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="ddCounty" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="ddCounty"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="ddCity" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="ddCity"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="ddNewspaper" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="ddNewspaper"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="lblPublishesOn1" /> |
| <telerik:AjaxUpdatedControl ControlID="lblPublishesOn2" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadComboBox ID="ddState" runat="server" AutoPostBack="True" DataSourceID="sdsState" |
| DataTextField="STATENAME" DataValueField="STATEID" AppendDataBoundItems="True" |
| CausesValidation="False" Skin="Web20" TabIndex="3" CollapseDelay="10" |
| ExpandDelay="10"> |
| <Items> |
| <telerik:RadComboBoxItem runat="server" Text="-- Select a State --" Value="0" /> |
| </Items> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </telerik:RadComboBox> |
| Protected Sub ddState_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles ddState.SelectedIndexChanged |
| ddCounty.ClearSelection() |
| ddCounty.Items.Clear() |
| ddCounty.Items.Add(New RadComboBoxItem("-- Select a County --", 0)) |
| ddCounty.Enabled = True |
| lblPublishesOn1.Visible = False |
| lblPublishesOn2.Visible = False |
| ddCounty.Focus() |
| End Sub |
| Protected Sub ddCounty_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles ddCounty.SelectedIndexChanged |
| ddCity.ClearSelection() |
| ddCity.Items.Clear() |
| ddCity.Items.Add(New RadComboBoxItem("-- Select a City --", 0)) |
| ddCity.Enabled = True |
| lblPublishesOn1.Visible = False |
| lblPublishesOn2.Visible = False |
| ddCity.Focus() |
| End Sub |
| Protected Sub ddCity_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles ddCity.SelectedIndexChanged |
| ddNewspaper.ClearSelection() |
| ddNewspaper.Items.Clear() |
| ddNewspaper.Items.Add(New RadComboBoxItem("-- Select a Newspaper --", 0)) |
| ddNewspaper.Enabled = True |
| lblPublishesOn1.Visible = False |
| lblPublishesOn2.Visible = False |
| ddNewspaper.Focus() |
| End Sub |
| Protected Sub ddNewspaper_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) |
| . . . |
| lblPublishesOn1.Text = pubMon & pubTue & pubWed & pubThu & pubFri & pubSat & pubSun |
| lblPublishesOn2.Text = "Deadline: " & deadLine & " days prior at " & deadTime & " (" & deadTimZon & ")" |
| lblPublishesOn1.Visible = True |
| lblPublishesOn2.Visible = True |
| rdpRun1.Focus() |
| End Sub |