Updating Combo Box inside EO.Web.Progressbar

1 posts, 0 answers
  1. David
    David avatar
    25 posts
    Member since:
    Oct 2010

    Posted 31 Aug 2011 Link to this post

    Sorry this is for a listbox not a combobox but the answer should be the same.


    I am using two Comboboxes in an asp.net form that also uses EOWeb's progressbar. Everything seems to work internally. The file is called from the first box processed and moved to the second box. Unfortunately when calling it from within this function the boxes never display the new information.

    How can I trigger this change or display the changes once completed? here is the code I am using

    protected void ProgressBar2_RunTask(object sender, EO.Web.ProgressTaskEventArgs e)
        int tcount = UploadListBox.Items.Count;
        if (tcount < 1)
            e.UpdateProgress(0, "You must have files to process.");
        int increment = 100 / tcount;
        int completed = 0;
        string pfile;
        string[] fileparts;
        //var item = new Telerik.Web.UI.RadListBoxItem();
        for (int i = 0; i < (tcount); i++)
            string filetype;
            pfile = UploadListBox.Items[0].Value.ToString();
            e.UpdateProgress(completed, "Processing: " + pfile);
            fileparts = pfile.Split('_');
            MstrType = Right(fileparts[1], 1).ToUpper();
            Batch = Convert.ToInt32(fileparts[0]);
            MstrYearMonth = Convert.ToInt32(Left(fileparts[3], 6));
            DateCreated = StrToDate(fileparts[3]);
            filetype = Left(fileparts[1], 3);
            if (filetype == "834")
            else if (filetype == "820")
            var item = new Telerik.Web.UI.RadListBoxItem();
            item.Value = pfile;
            item.Text = pfile;
            File.Delete(filepath + pfile);
            completed = completed + increment;
        e.UpdateProgress(100, "Completed...");

     The progressbar does call this javascript routine as well.

    function OnProgress(progressBar)
        var extraData = progressBar.getExtraData();
        if (extraData)
            //The following code demonstrates how to update
            //client side DHTML element based on the value
            //RunTask passed to us with e.UpdateProgress
            var div = document.getElementById("divStatus");
            div.innerHTML = extraData;      

    Help is always greatly appreciated.

Back to Top