Hi,
I am checking for invalid extensions using following syntax:
<asp:CustomValidator runat="server" ID="CustomValidatorForRadUpload" Display="None" ClientValidationFunction="ValidateFileExtensions">Invalid extensions.</asp:CustomValidator>
<telerik:RadUpload Width="100%" ID="radMultipleFileUpload" InitialFileInputsCount="1"
Skin="Gray" runat="server" OnClientFileSelected="fnClicked" OnClientDeleting="fnCheckInputRowsExists"
AllowedFileExtensions=".jpg,.jpeg,.gif,.png" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
</telerik:RadUpload>
Javascript function is as follows:
function ValidateFileExtensions(source, arguments)
{
var blnIsValid;
blnIsValid = $find("<%= radMultipleFileUpload.ClientID %>").validateExtensions();
if (!blnIsValid)
{
alert("Please upload images with jpg, jpeg, gif, or png extensions.")
return false;
}
return true;
}
1) Here after this function gets called and if user have selected invalide file extensions then.
function returns false.
But still page gets postback which i dont want to happen.
2) Also I dont want any message to be displayed on the radupload area. How can I prevent that.
Please reply.
<script>
function fnSetInfo()
{
alert("Inside the function");
}
</script>
<
telerik:RadScheduler ID="radSchedulCalender" runat="server" DataEndField="Endtime"
DataKeyField="UNIQUEID" DataStartField="STARTTIME" DataSubjectField="subject"
DayStartTime="06:00:00" DisplayDeleteConfirmation="False" EnableEmbeddedScripts="true"
EnableViewState="False" MonthVisibleAppointmentsPerDay="4" OnClientAppointmentDeleting="OnClientAppointmentDeleting"
OnClientAppointmentEditing="OnClientAppointmentEditing" OnClientAppointmentInserting="OnClientAppointmentInserting"
OnClientAppointmentMoveEnd="OnClientAppointmentMoveEnd" Skin="Outlook" StartEditingInAdvancedForm="False"
WorkDayEndTime="18:00:00" WorkDayStartTime="06:00:00">
<AppointmentTemplate>
<div id="divDragSource" ondragstart="fnSetInfo()">
<asp:Label ID="lblAppTime" runat="server" Width="100%"></asp:Label>
<asp:Label ID="lblSub" runat="server" Width="100%"></asp:Label>
<asp:HyperLink ID="lblActivity" runat="server"></asp:HyperLink>
</div>
</AppointmentTemplate>
<MonthView VisibleAppointmentsPerDay="4" />
<TimelineView UserSelectable="false" />
</telerik:RadScheduler>
Also I tried by applying the ondragstart event from "radSchedulCalender_AppointmentCreated" server side event.
Dim divSrc As HtmlGenericControl = New HtmlGenericControl("DIV")
divSrc = e.Container.FindControl("divDragSource")
divSrc.Attributes.Add("ondragstart", "return fnSetInfo()")
Also I tried with applying 'onclick event to the division but it is also not getting fired.
I also tried with applying event to the label which is in the appointment from server side.
lblSub = CType(e.Container.FindControl("lblSub"), Label)
lblSub.Attributes.Add("ondragstart", "return fnSetInfo();")
This is also not getting fired.
Do radscheduler supports such behaviour i.e. deagging an appointment item to the outside of radscheduler?
Can anyone please help me in this?
Best Regards,
Hrushikesh.
<
EditItemTemplate>
<asp:TextBox ID="TextBoxPrice" Text='<%# Bind("Price", "{0:#.00} €") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
As you can see, there is a value from the data source (property 'Price') bound with formating information to an appropriate TextBox control. But when I try to update - of course - the operation fails. The string "10,00 €" could not be parsed as an numeric value. Now I would expect an event wich gives me the instance of the current bound item or a value that I can change - anything to customized changing string "10,00 €" to "10,00" or custom filling values to the object. But I can't find anything related :-S
Am I missing something here???
Best regards,
Oliver