if
(UltraWebGrid1.Rows[i].Cells[7].DataChanged == true
{
<
EditFormSettings
EditFormType
=
"Template"
>
<
FormStyle
CssClass
=
"GridForm"
></
FormStyle
>
<
FormTemplate
>
<
uc:UserRights
ID
=
"urEditForm"
UserID='<%# (Container is GridEditFormInsertItem) ? 0 :
DataBinder.Eval(Container.DataItem,"ID") %>'
runat="server"/>
</
FormTemplate
>
</
EditFormSettings
>
My question is: what event can I hook that will provide me both access to the identity column value of the newly inserted item AND still let me trigger the public method on my user control so that it can update what it needs to update?
(There is much more to the form than simply the user control. We are using mostly databound controls on the form template. This user control is somewhat more complex and needs to be reusable, which is why we chose to compartmentalize it into its own control.)
Thanks!
have the following code to export and I get this error:
Code:
protected void RadScheduler1_AppointmentCommand(object sender, AppointmentCommandEventArgs e)
{
if (e.CommandName == "Export")
{
WriteCalendar(
RadScheduler.ExportToICalendar(e.Container.Appointment));
}
}
private
void WriteCalendar(string data)
{
HttpResponse response = Page.Response;
response.End();
response.Clear();
response.Buffer =
true;
response.ContentType =
"text/calendar";
response.ContentEncoding =
Encoding.UTF8;
response.Charset =
"utf-8";
response.AddHeader(
"Content-Disposition", "attachment;filename=\"RadSchedulerExport.ics\"");
response.Write(data);
response.End();
}
htm in the code:
function Export(sender, e)
{
$find(
"<%# RadAjaxManager1.ClientID %>").__doPostBack(sender.name, "");
}
<
telerik:RadScheduler ID="RadScheduler1" runat="server" Skin="Hay" StartInsertingInAdvancedForm="True"
OnAppointmentDelete="RadScheduler1_AppointmentDelete" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"
OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnNavigationComplete="RadScheduler1_NavigationComplete"
Height="550px" Width="800px" CustomAttributeNames="Engagement,CodigoEmpleado"
OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" ShowFooter="False"
DayStartTime="07:00:00" WorkDayEndTime="18:00:00" WorkDayStartTime="07:00:00"
OnAppointmentCreated="RadScheduler1_AppointmentCreated" OnFormCreating="RadScheduler1_FormCreating"
OnFormCreated="RadScheduler1_FormCreated" EnableDescriptionField="True" BorderStyle="Solid"
EnableCustomAttributeEditing="True" OnAppointmentCommand="RadScheduler1_AppointmentCommand">
<TimelineView UserSelectable="False" />
<AppointmentTemplate>
<span style="font-weight: bold; font-size: small">
<div>
<%
# Eval("Subject") %>
<asp:Button runat="server" ID="Button1" CssClass="rsExportButton" ToolTip="Exportar reserva"
CommandName="Export" OnClientClick="Export(this, event); return false;" Style="cursor: pointer;
cursor: hand;"
/>
</div>
</span>
<%
# Eval("Resources[0].text") %>
<div>
<%
# Eval("Resources[1].text")%>
</div>
</AppointmentTemplate>
<TimeSlotContextMenuSettings EnableDefault="True" />
<AppointmentContextMenuSettings EnableDefault="True" />
<AdvancedForm Modal="True" EnableCustomAttributeEditing="True" />
<WeekView DayStartTime="07:00:00" WorkDayEndTime="18:00:00" WorkDayStartTime="07:00:00" />
<Localization AdvancedAllDayEvent="Todo el día" AllDay="Todo el día" AdvancedEditAppointment="Modificar Reserva"
AdvancedNewAppointment="Nueva Reserva" Cancel="Cancelar" ConfirmDeleteText="Esta seguro de querer eliminar la reserva?"
Save="Guardar" />
<DayView DayStartTime="07:00:00" WorkDayEndTime="18:00:00" WorkDayStartTime="07:00:00" />
</telerik:RadScheduler>
the error that throws me is:
Sys.webforms.PageRequestManagerParseErrorException: the message received the server could not be parsed. Common couses for this error are when the response is modified by call to Response.Write(), response filters HttpModules or server trace is enabled.
Details: error pasing near 'BEGIN:VCALENDAR VER'
that may be, thanks for your help
<WebMethod()> _
Public
Function
HelloWorld(
ByVal
s
As
String
)
As
String
Dim
np
As
Page =
New
Page
np.Controls.Add(
New
Telerik.Web.UI.RadScriptManager)
Dim
d
As
Telerik.Web.UI.RadDatePicker =
New
Telerik.Web.UI.RadDatePicker
d.ID =
"ddd"
d.EnableViewState =
False
d.DbSelectedDate = Now
d.RegisterWithScriptManager =
False
d.Page = np
Dim
tw
As
System.IO.StringWriter =
New
System.IO.StringWriter()
Dim
hw
As
HtmlTextWriter =
New
HtmlTextWriter(tw)
d.RenderControl(hw)
Return
tw.ToString()
End
Function
<%@ Page Language=
"vb"
AutoEventWireup=
"false"
CodeBehind=
"WebForm1.aspx.vb"
Inherits=
"WebApplication2.WebForm1"
%>
<%@ Register Assembly=
"Telerik.Web.UI"
Namespace=
"Telerik.Web.UI"
TagPrefix=
"telerik"
%>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<html xmlns=
"http://www.w3.org/1999/xhtml"
>
<head runat=
"server"
>
<script type=
"text/javascript"
src=
"http://code.jquery.com/jquery-1.5.min.js"
></script>
<!--http:
//code.jquery.com/jquery-1.5.js-->
<title></title>
</head>
<body>
<form id=
"form1"
runat=
"server"
>
<telerik:RadScriptManager ID=
"RadScriptManager1"
runat=
"server"
></telerik:RadScriptManager>
<script language=
"javascript"
type=
"text/javascript"
>
function
BC(s, e) {
$.ajax({ url:
"/Webservice1.asmx/HelloWorld?s="
+ s.get_id(), success:
function
(result) {
//var nd = $("#RadDatePicker1")[0].cloneNode();
//nd.id = "asd";
$(
"#c"
)[0].innerHTML = result.text;
//$("#c")[0].insertBefore($("#RadDatePicker1")[0]);
//nd.style.visibility = "visible";
}
});
}
</script>
<div id=
"c"
></div>
<div>
<!--
<telerik:RadDatePicker ID=
"RadDatePicker1"
Runat=
"server"
></telerik:RadDatePicker>-->
<telerik:RadButton ID=
"RadButton1"
runat=
"server"
onclientclicked=
"BC"
AutoPostBack=
"False"
>
</telerik:RadButton>
</div>
</form>
</body>
</html>
-Then I tryed the cloneNode function, but I can't even make the raddatepicker appear
var
nd = $(
"#RadDatePicker1"
)[0].cloneNode(true);
nd.id =
"asd"
;
$(
"#c"
)[0].insertBefore(nd);
//$("#c")[0].innerHTML = result.text;
Idealy, I guess I want to statically generate all the necessary scripts and one instance of each control that I need
and then clone them dynamically with javascript as needed.
Is there a way to this? Is there a javascript telerik.ui.raddatepicker constructor?
You guys must have a way since there is a client side radgrid insert row
Thank you very much
Louis
.rbSkinnedButton
{
display
: inline-
block
;
position
:
relative
;
background-color
:
transparent
;
background-repeat
:
no-repeat
;
border
:
0
none
;
height
:
22px
;
text-align
:
center
;
text-decoration
:
none
;
white-space
:
nowrap
;
background-position
:
right
0
;
padding-right
:
4px
;
/* this value is hacked for webkit */
}
.rbDecorated
{
display
:
block
;
height
:
22px
;
padding
:
0
6px
0
10px
;
border
:
0
;
text-align
:
center
;
background-position
:
left
-22px
;
overflow
:
visible
;
background-color
:
transparent
;
outline
:
none
;
cursor
:
pointer
;
-wbkite-border-radius:
0
;
/* set default border-radius to 0 in mobile safari */
}