We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

uploadBox

Hi,

1) is it possible to add one file only via uploadBox, I mean when I uploaded some file 'A' next time i'll use uploadBox, file 'A' should be replaced by file 'B'.

2) is it possible to hide uploaded files list (below Browse) permanently? Or render it on the right side of the button.



6 Replies

JB Jaffersathick B Syncfusion Team October 17, 2011 10:20 AM UTC

Hi,

Thank you for using Syncfusion products.

Before I start proceeding to provide you the solution, I would like to know which platform you are looking for ASP.NET or ASP.NET MVC.
Also regarding your second query a screen shot of how you are looking for would be greatly helpful for us to provide the exact solution.

Regards,
Jaffer




JB Jaffersathick B Syncfusion Team October 17, 2011 10:20 AM UTC

Hi,

Thank you for using Syncfusion products.

Before I start proceeding to provide you the solution, I would like to know which platform you are looking for ASP.NET or ASP.NET MVC.
Also regarding your second query a screen shot of how you are looking for would be greatly helpful for us to provide the exact solution.

Regards,
Jaffer




EM emcek October 25, 2011 05:56 AM UTC

Hi,

thanks for your fast answer, unfortunately I have been busy in another area.. I'm using mvc.net (razor). And i'm looking for something like on attached screenshot.

Regards,
McK



uploadBox_6a910baf.rar


ME Meena Syncfusion Team October 27, 2011 11:05 AM UTC

Hi Emcek,

1.Your first requirement of replacing the existing file with a new file in Upload box could be achieved by inserting the following code snippet in the controller.


var fileName = Path.GetFileName(file.FileName);
string[] files = System.IO.Directory.GetFiles(Server.MapPath("~/Upload"));
foreach (string s in files)
{

System.IO.File.Delete(s);

}
var destinationPath = Path.Combine(Server.MapPath("~/Upload"), fileName);

file.SaveAs(destinationPath);



2.Your second requirement of placing the uploaded file list to the right of the Browse button could be achieved by setting the particular CSS properties.


[CSS]
.upload-file-list
{
margin-left:75px;
margin-top:-46px;
}


We have created a sample with Upload box and the same can be downloaded from the below

Let us know if you have any queries.

Regards,
Meena



Upload-Incident_f40307a1.zip


MH Mauricio Hernandez April 5, 2018 08:57 PM UTC

Hello, good afternoon, I have problem with the "refreshAppointments" this is my razor and I load the scheduler well, but when I want to reload it with the javascript function says:

Cannot read property 'refreshAppointments' of undefined

in this way I charge the scheduler:

<div id="Schedule1" style="float: left; margin: 20px;">

                        @section ControlsSection{

                            @(Html.EJ().Schedule("Schedule1")
                                .Width("95%")
                                .Height("900px")
                                .EnableLoadOnDemand(true)
                                 .Locale("es-ES")
                                 .TimeZone("UTC -00:00")
                                .CurrentDate(DateTime.Now)
                                .ShowQuickWindow(true)
                                .AllowInline(false)
                                .EnableAppointmentResize(true)
                                .AppointmentSettings(fields => fields.Datasource(ds => http://localhost:8080/Calendar/LoadData).CrossDomain(true))
                                    .Id("Id")
                                    .Subject("Subject")
                                    .StartTime("StartTime")
                                    .EndTime("EndTime")
                                    .Description("Description")
                                    .AllDay("AllDay")
                                    .Recurrence("Recurrence")
                                    .RecurrenceRule("RecurrenceRule"))
                                .ScheduleClientSideEvents(e => e.AppointmentWindowOpen("onAppointmentWindowOpen")
                                    .CellDoubleClick("onCellDoubleClick")
                                    .AppointmentClick("onAppointmentClick")
                                    .Create("onCreate")
                                    .DragStop("onDragAndDrop")
                                    .ResizeStop("onResize")
                                    )
                                )
                        }
                    </div>


NR Nevitha Ravi Syncfusion Team April 8, 2018 04:58 PM UTC

Hi Maurici, 

Thank you for contacting Syncfusion Support. 

We suspect that the refreshApppointments method is getting called before the scheduler renders on the page, which might cause such reported problem. We have prepared a simply sample, by calling refreshAppointments method of schedule within the button click event which can be downloaded from the following location. 

Please check the above sample, and if you face same issue - kindly revert us with the details on which scenario or where you have called the refreshAppointments method and also if possible share the schedule code snippets too to proceed further on this. 

Regards, 
Nevitha. 


Loader.
Live Chat Icon For mobile
Up arrow icon