Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
105 views
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>
Veronica
Telerik team
 answered on 22 Oct 2010
1 answer
141 views
Hi,
I am new to Telerik. I have developed a a screen containing Telerik panel bars containing, telerik text boxes, comboboxes and Telerik Grid andTelerik date picker.
There are 5 panel items each containg on total 38 controls and 5-7 validators
follwoing are the details,
1. Telerik Trial version
2. OS the application is being tetsed in: Windows 7/Windows 2008 server/ Windows XP
3. Browser:  IE8, Mozilla 3.0
4. Working Environment: Visual Studio 2010

The follwing are the issues,
1.  Performance is bad during load of page in Windows 7/Windows 2008 server and  when items are being selected from comboxes .  Performance is better in Windows XP.
2. The screen flickers on occurance of events, and the controls lose set width.
3. These Issues are not that noticeable in Mozilla.

I have looked into the optimization section, but was not of much help. Pl suggest.
Pavlina
Telerik team
 answered on 22 Oct 2010
3 answers
1.0K+ views
hey everyone,

How are cells of a row accessed in RadGrid,i have used data table as data source and i want to access cells something like this in Gridview.How can i achieve this?...

 if (gvOrders.Rows.Count > 0)
            {
                foreach (GridViewRow row in gvOrders.Rows)
                {
                    InsertOrder(Convert.ToInt32(row.Cells[0].Text), Convert.ToInt32(row.Cells[3].Text));
                }
            }

Thanks
Amit
Princy
Top achievements
Rank 2
 answered on 22 Oct 2010
2 answers
74 views

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.

 

 

Pavlina
Telerik team
 answered on 22 Oct 2010
1 answer
117 views
Hi,

I am using following code for fomating one of the grid column.

 

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

Tsvetina
Telerik team
 answered on 22 Oct 2010
1 answer
105 views
Hi,
 I have Devloped Composit control(RADMaskedTExtbox,RadCombobox).i have written javascript as Follows in Composit Control Test page

 

 

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

Cori
Top achievements
Rank 2
 answered on 22 Oct 2010
5 answers
153 views
Hello!

I get the following error when double clicking on the grid row or clicking the edit button in the row, which I want to edit in place:

System.ArgumentOutOfRangeException: The specified argument is out of range
Argument name: index

It is not an ajax failure, because it also happens out of a update panel. My code is inspired from the demo here: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx

My code looks like this (the "important" part):

 

<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

Pavlina
Telerik team
 answered on 22 Oct 2010
1 answer
60 views
i want to change the change back color of present day and change back color of other dates on mouse over by the user..

please help here is my code

 <telerik:RadDateTimePicker ID="StartDtPicker" runat="server" Skin="Windows7"
                                EnableMonthYearFastNavigation="true">
                               
                                <Calendar MultiViewColumns="3" MultiViewRows="1" ShowOtherMonthsDays="false"
                                ShowRowHeaders="false" CalendarTableStyle-BackColor="AliceBlue"
                                DayStyle-Font-Bold="true" EnableMonthYearFastNavigation="true">
                                </Calendar>
       </telerik:RadDateTimePicker>
Vasil
Telerik team
 answered on 22 Oct 2010
6 answers
141 views
How to hide week's number and make the <<, <, >, >> button work in multi month view calender i.e. with 1 row and 3 columns?

thanks
Pramodh
Vasil
Telerik team
 answered on 22 Oct 2010
3 answers
153 views
actually when I display 3 multi month view I get October, November and December months view where as I want Sep, Oct and November view..

can some thing be done for this?
Vasil
Telerik team
 answered on 22 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?