日期:2014-05-17  浏览次数:20490 次

RadUpload控件为何当文件小于5M时进度条不显示
请教各位大虾,为何我引用RadUpload第三方控件当上传的文件小于5M时进度条无法显示,是否可以在哪里设置的?

------解决方案--------------------

 <telerik:RadProgressManager id="Radprogressmanager1" runat="server" />
            
            <telerik:RadProgressArea id="RadProgressArea1" runat="server" />
 protected void Page_Load(object sender, System.EventArgs e)
        {
            if (!IsPostBack)
            {
                //Do not display SelectedFilesCount progress indicator.
                RadProgressArea1.ProgressIndicators &= ~ProgressIndicators.SelectedFilesCount;
            }

            RadProgressArea1.Localization.Uploaded = "Total Progress";
            RadProgressArea1.Localization.UploadedFiles = "Progress";
            RadProgressArea1.Localization.CurrentFileName = "Custom progress in action: ";
        }

        protected void buttonSubmit_Click(object sender, System.EventArgs e)
        {
            UpdateProgressContext();
        }

        private void UpdateProgressContext()
        {
            const int total = 100;

            RadProgressContext progress = RadProgressContext.Current;
            progress.Speed = "N/A";

            for (int i = 0; i < total; i++)
            {
                progress.PrimaryTotal = 1;
                progress.PrimaryValue = 1;
                progress.PrimaryPercent = 100;

                progress.SecondaryTotal = total;
                progress.SecondaryValue = i;
                progress.SecondaryPercent = i;