Hello,
I can't figure out why doesn't display de inline form (showInsertFormAt, even showInlineInsertForm).
This only work if i remove the InlineInsertTemplate...
any clues?
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> <telerik:RadFormDecorator ID="RadFormDecorator1" DecorationZoneID="DecoratedControlsContainer" runat="server" /> <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true" Skin="Office2007"> </telerik:RadWindowManager> <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> function OnClientAppointmentInserting(sender, eventArgs) { $find("<%= txtidFuncionario.ClientID %>").value = $get("txtidFuncionario").value; $find("<%= txtDiasPlanificados.ClientID %>").value = $get("txtDiasPlanificados").value; } function OnClientTimeSlotClick(sender, eventArgs) { var slot = sender.get_activeModel().getTimeSlotFromDomElement(eventArgs.get_domEvent().target); sender.showInlineInsertForm(slot); } function OnClientAppointmentClick(sender, e) { var apt = e.get_appointment(); sender.editAppointmentWithConfirmation(apt); } function rowDropping(sender, eventArgs) { var htmlElement = eventArgs.get_destinationHtmlElement(); var scheduler = $find('<%= RadScheduler1.ClientID %>'); if (isPartOfSchedulerAppointmentArea(htmlElement)) { var timeSlot = scheduler._activeModel.getTimeSlotFromDomElement(htmlElement); $find("<%= txtTargetSlot.ClientID %>").value = timeSlot.get_index(); eventArgs.set_destinationHtmlElement("txtTargetSlot"); scheduler.showInlineInsertForm(timeSlot); } else { eventArgs.set_cancel(true); } } function isPartOfSchedulerAppointmentArea(htmlElement) { return $telerik.$(htmlElement).parents().is("div.rsAllDay") || $telerik.$(htmlElement).parents().is("div.rsContent") } </script> </telerik:RadScriptBlock> <telerik:RadTextBox ID="txtTargetSlot" runat="server" CssClass="hidden_field"> </telerik:RadTextBox> <telerik:RadTextBox ID="txtidFuncionario" runat="server" CssClass="hidden_field"> </telerik:RadTextBox> <telerik:RadTextBox ID="txtDiasPlanificados" runat="server" CssClass="hidden_field"> </telerik:RadTextBox> <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadScheduler1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadSplitter ID="RadSplitter1" LiveResize="true" runat="server" Orientation="Vertical" Width="100%"> <telerik:RadPane ID="RadPane1" runat="server" Width="160" MinWidth="160"> <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="dsPersonal" Skin="Web20" OnItemDataBound="RadGrid1_ItemDataBound" GridLines="None" AutoGenerateColumns="False" OnRowDrop="RadGrid1_RowDrop" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" ShowFooter="True"> <ClientSettings AllowRowsDragDrop="True"> <Selecting AllowRowSelect="True" /> <ClientEvents OnRowDropping="rowDropping" /> </ClientSettings> <MasterTableView AutoGenerateColumns="False" DataKeyNames="id_funcionario" DataSourceID="dsPersonal"> <CommandItemSettings ExportToPdfText="Exportar a PDF" /> <Columns> <telerik:GridBoundColumn Visible="false" DataField="id_funcionario" HeaderText="id_funcionario" SortExpression="id_funcionario" UniqueName="id_funcionario"> </telerik:GridBoundColumn> <telerik:GridBoundColumn ItemStyle-Width="100%" DataField="nombre_completo" HeaderText="Personal" SortExpression="nombre_completo" UniqueName="nombre_completo"> <ItemStyle Width="100%" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn Visible="false" DataField="estado_cumplimiento" HeaderText="Estado Cumplimiento" SortExpression="estado_cumplimiento" UniqueName="estado_cumplimiento"> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid> </telerik:RadPane> <telerik:RadSplitBar ID="RadSplitBar1" runat="server" /> <telerik:RadPane ID="RadPane2" runat="server"> <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" Skin="Web20" /> <telerik:RadScheduler Height="398" runat="server" ID="RadScheduler1" DataEndField="fecha_hasta" DataKeyField="id_vacacion_planificada" DataSourceID="dsVacaciones" DataStartField="fecha_desde" DataSubjectField="id_vacacion_planificada" Skin="Web20" LastDayOfWeek="Sunday" OnClientTimeSlotClick="OnClientTimeSlotClick" OnClientAppointmentClick="OnClientAppointmentClick" Culture="Spanish (Chile)" AdvancedForm-EnableResourceEditing="true" AllowDelete="False" AdvancedForm-Enabled="False" OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnClientAppointmentInserting="OnClientAppointmentInserting"> <%--<AdvancedForm Modal="true" /> <TimeSlotContextMenuSettings EnableDefault="true" /> <AppointmentContextMenuSettings EnableDefault="true" />--%> <AppointmentTemplate> <span class="AppointmentTemplate_span"> <%# Eval("nombre_completo.Text") %></span> </AppointmentTemplate> <InlineInsertTemplate> <div class="rsAdvancedEdit"> <div class="rsAdvTitle"> <h1 class="rsAdvInnerTitle"> Inserta una Planificación</h1> <asp:LinkButton runat="server" ID="AdvancedEditCloseButton" CssClass="rsAdvEditClose" CommandName="Cancel" CausesValidation="false" ToolTip='<%# Container.Appointment.Owner.Localization.AdvancedClose %>'> <%# Container.Appointment.Owner.Localization.AdvancedClose%> </asp:LinkButton> </div> <div class="rsAdvContentWrapper"> <div class="frmTemplate"> <span class="tmp_span">Colaborador</span><span id="spanColaboradorInsert" runat="server"></span> <br /> <span class="tmp_span">Fecha Desde</span> <telerik:RadDatePicker ID="rdpFechaDesdeInsert" runat="server" Skin="Web20" /> <br /> <span class="tmp_span">Fecha Hasta</span> <telerik:RadDatePicker ID="rdpFechaHastaInsert" runat="server" Skin="Web20" /> <br /> <span class="tmp_span">Dias Planificados</span> <telerik:RadTextBox ID="txtDiasPlanificadosInsert" runat="server" Skin="Web20"> </telerik:RadTextBox> </div> <asp:Panel runat="server" ID="ButtonsPanel" CssClass="rsAdvancedSubmitArea"> <div class="rsAdvButtonWrapper"> <asp:LinkButton CommandName="Insert" runat="server" ID="UpdateButton" CssClass="rsAdvEditSave"><span><%# Container.Appointment.Owner.Localization.Save%></span> </asp:LinkButton> <asp:LinkButton runat="server" ID="CancelButton" CssClass="rsAdvEditCancel" CommandName="Cancel" CausesValidation="false"><span><%# Container.Appointment.Owner.Localization.Cancel%></span> </asp:LinkButton> </div> </asp:Panel> </div> </InlineInsertTemplate> <InlineEditTemplate> <div class="rsAdvancedEdit"> <div class="rsAdvTitle"> <h1 class="rsAdvInnerTitle"> Inserta una Planificación</h1> <asp:LinkButton runat="server" ID="AdvancedEditCloseButton" CssClass="rsAdvEditClose" CommandName="Cancel" CausesValidation="false" ToolTip='<%# Container.Appointment.Owner.Localization.AdvancedClose %>'> <%# Container.Appointment.Owner.Localization.AdvancedClose%> </asp:LinkButton> </div> <div class="rsAdvContentWrapper"> <div class="frmTemplate"> <span class="tmp_span">Colaborador</span><span id="spanColaboradorEdit" runat="server"><%# Eval("nombre_completo.Text")%></span> <br /> <span class="tmp_span">Fecha Desde</span> <telerik:RadDatePicker ID="rdpFechaDesdeEdit" runat="server" Skin="Web20" DbSelectedDate='<%# Eval("fecha_desde.Text") %>' /> <br /> <span class="tmp_span">Fecha Hasta</span> <telerik:RadDatePicker ID="rdpFechaHastaEdit" runat="server" Skin="Web20" DbSelectedDate='<%# Eval("fecha_hasta.Text") %>' /> <br /> <span class="tmp_span">Dias Planificados</span> <telerik:RadTextBox ID="txtDiasPlanificadosEdit" runat="server" Skin="Web20" Text='<%# Eval("dias_planificados.Text") %>'> </telerik:RadTextBox> </div> <asp:Panel runat="server" ID="ButtonsPanel" CssClass="rsAdvancedSubmitArea"> <div class="rsAdvButtonWrapper"> <asp:LinkButton CommandName="Update" runat="server" ID="UpdateButton" CssClass="rsAdvEditSave"><span><%# Container.Appointment.Owner.Localization.Save%></span> </asp:LinkButton> <asp:LinkButton runat="server" ID="CancelButton" CssClass="rsAdvEditCancel" CommandName="Cancel" CausesValidation="false"><span><%# Container.Appointment.Owner.Localization.Cancel%></span> </asp:LinkButton> </div> </asp:Panel> </div> </InlineEditTemplate> <ResourceTypes> <telerik:ResourceType DataSourceID="dsVacaciones" ForeignKeyField="fecha_desde" KeyField="fecha_desde" Name="fecha_desde" TextField="fecha_desde" /> <telerik:ResourceType DataSourceID="dsVacaciones" ForeignKeyField="fecha_hasta" KeyField="fecha_hasta" Name="fecha_hasta" TextField="fecha_hasta" /> <telerik:ResourceType DataSourceID="dsVacaciones" ForeignKeyField="nombre_completo" KeyField="nombre_completo" Name="nombre_completo" TextField="nombre_completo" /> <telerik:ResourceType DataSourceID="dsVacaciones" ForeignKeyField="dias_planificados" KeyField="dias_planificados" Name="dias_planificados" TextField="dias_planificados" /> </ResourceTypes> </telerik:RadScheduler> </telerik:RadPane> </telerik:RadSplitter>Hi All,
I have a ajaxified Radgrid, having some columns,
there is one button column for file dowwnload.
when we hit that button
the files from server should get downloaded.
But due to ajaxification, we are not able to download the files.
If i remove the radajaxmanager then i am able to download the files.
protected void GrdDocs_OnItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == "Download")
{
GridDataItem item = e.Item as GridDataItem;
string filePath = item["FILEPATH"].Text;
string filename = Path.GetFileName(filePath);
Response.ClearContent();
Response.Clear();
Response.ContentType = "application/zip";
Response.AppendHeader("content-disposition", "attachment; filename=" + filename);
try
{
//RadAjaxManager1.ResponseScripts.Add(String.Format(@"window.location.href = ""{0}"";", filePath));
Response.TransmitFile(filePath);
Response.Flush();
//Response.End();
}
catch(exception e)
{
}
}
}
------------------
In ASCX page
<telerik:GridButtonColumn ButtonType="LinkButton" CommandName="Download" HeaderText="AVAILABLE FILES"
Text="Download" UniqueName="FILEPATH">
</telerik:GridButtonColumn>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="Submit">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
Note: The submit button is inside asp:updatePanel.
Private Sub Grid_ColumnCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridColumnCreatedEventArgs) Handles WITSGrid.ColumnCreated
If InStr(e.Column.UniqueName, "USD", CompareMethod.Binary) > 1 Then
e.Column.ItemStyle.HorizontalAlign = HorizontalAlign.Right
Dim x As GridBoundColumn = CType(e.Column, GridBoundColumn)
x.DataFormatString =
"{0:###,###.###}"
End If
End Sub
problem is when that column has 0 values then it is displaying as null vall (empty cell) insted of 0.000. Can you please suggest me.
Regards
admin
function Callme() {
var
Input1 = $find("<%= TextBox1.ClientID %>");
Input1.SetValue(15);
}
i am calling this onblur function of Textbox ,i have added attribute on page load as
TextBox1.Attributes.Add(
"onblur", "Callme();");
It is throughing an error Null object.
Please help me how to resolve this
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> function RowDblClick(sender, eventArgs) { sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical()); } </script> </telerik:RadCodeBlock> <telerik:RadGrid ID="rgKalkulation" runat="server" AutoGenerateEditColumn="false" AutoGenerateDeleteColumn="false" OnNeedDataSource="rgKalkulation_NeedDataSource" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" PageSize="10" AllowAutomaticUpdates="True" OnDeleteCommand="rgKalkulation_DeleteCommand" OnInsertCommand="rgKalkulation_InsertCommand" OnUpdateCommand="rgKalkulation_UpdateCommand" OnItemDataBound="rgKalkulation_OnItemDataBound"> <MasterTableView CommandItemSettings-RefreshText="" CommandItemDisplay="Bottom" AutoGenerateColumns="false" Font-Size="8pt" Font-Names="Verdana" runat="server" NoMasterRecordsText="Keine Datensätze vorhanden." InsertItemDisplay="Bottom" CommandItemSettings-AddNewRecordText="Datensatz hinzufügen" EditMode="InPlace" ShowGroupFooter="true" DataKeyNames="id"> <GroupByExpressions> <telerik:GridGroupByExpression> <SelectFields> <telerik:GridGroupByField HeaderText="Art.-Gr." FieldName="artgrkopf"></telerik:GridGroupByField> </SelectFields> <GroupByFields> <telerik:GridGroupByField FieldName="artgr" SortOrder="Ascending"></telerik:GridGroupByField> </GroupByFields> </telerik:GridGroupByExpression> </GroupByExpressions> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"> <ItemStyle CssClass="MyImageButton" /> </telerik:GridEditCommandColumn> <telerik:GridBoundColumn DataField="artgr" HeaderText="ArtGr" UniqueName="artgr" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="artbzl" HeaderText="Artikelbezeichnung" DefaultInsertValue="" UniqueName="artbzl" FooterText="Anzahl Artikel" Aggregate="Count"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="herstellerbezeichnung" HeaderText="Herstellerbezeichnung" DefaultInsertValue="" UniqueName="herstellerbezeichnung"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="artext" HeaderText="Art.-Nr." DefaultInsertValue="" UniqueName="artext"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="palettengewicht" HeaderText="Palettengewicht" DefaultInsertValue="" UniqueName="palettengewicht"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="mdevsx" HeaderText="Inhalt" DefaultInsertValue="" UniqueName="mdevsx"> </telerik:GridBoundColumn> <telerik:GridNumericColumn HeaderText="Absatz (to)" DataField="absatz" ColumnEditorID="GridNumericColumnEditor1" UniqueName="absatz"> </telerik:GridNumericColumn> <telerik:GridNumericColumn HeaderText="Nettoumsatz (T€)"> </telerik:GridNumericColumn> <telerik:GridNumericColumn HeaderText="Bruttoerlös (alt)"> </telerik:GridNumericColumn> <telerik:GridNumericColumn HeaderText="Nettoerlös (alt)"> </telerik:GridNumericColumn> <telerik:GridNumericColumn HeaderText="Bruttoerlös (neu)"> </telerik:GridNumericColumn> </Columns> </MasterTableView> <ClientSettings> <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="650px" /> <ClientEvents OnRowDblClick="RowDblClick" /> </ClientSettings> </telerik:RadGrid> <telerik:GridNumericColumnEditor ID="GridNumericColumnEditor1" runat="server"> </telerik:GridNumericColumnEditor>
I need (quick) help please, because tomorrow I have a meeting where I have to present this.
Kind regards
Michael