Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
125 views

When I export the RadEditor's content having table in it, it doesn't the table. Here is the simple HTML from the HTML tab of the editor (I did not with HTML and this is auto generated HTML when I place the table.)

<div>
<div>
<table>
    <tbody>
        <tr>
            <td>&nbsp;1</td>
            <td>2&nbsp;</td>
        </tr>
    </tbody>
</table>
<br />
Test
</div>
</div>

 

I am using Telerik 2011.2.712.40. Below is the attributes set for the editor in ASPX page, 

<telerik:RadEditor ID="radEditor1" runat="server" Skin="Default" Height="500px" Width="100%"
                                OnClientSelectionChange="OnClientSelectionChange" AutoResizeHeight="false" ContentFilters="DefaultFilters,MakeUrlsAbsolute"
                                OnClientCommandExecuting="OnClientCommandExecuting" NewLineMode="Div"  >
                                <ExportSettings FileName="exporttopdf" OpenInNewWindow="true" Pdf-PageBottomMargin="1.0 cm"
                                    Pdf-PageLeftMargin="1.5 cm" Pdf-PageRightMargin="1.5 cm" Pdf-PageTopMargin="1.0 cm">
                                </ExportSettings>

I am using the method, radEditor1.ExportToPdf(); in CodeBehind.

Deepa
Top achievements
Rank 1
 asked on 16 Feb 2017
1 answer
50 views
A fairly simple question:

Which CSS classes will I need to access and what will I need to change in them in order to effectively Horizontally Center the list of nodes in the Navigation bar?  

My aim is either to just center them, or center them in a 1080px wide area in the center.

Thank you!
Chris
Top achievements
Rank 1
 answered on 16 Feb 2017
1 answer
94 views

I try to binding year is 2560 with Kendo AJAX  but on grid display 2017.

It work on grid Kendo MVC with the same data.

I really have to use Kendo AJAX to development,So Is there  any missing?

 

Eyup
Telerik team
 answered on 16 Feb 2017
1 answer
96 views

Hi,

I'm using a Column Chart format of HtmlChart.   When I hover over the column, the tooltip value appears as expected.  However, when the mouse leaves the column, the tooltip value remains until I hover over a different column.  I would like the tooltip to disappear when I'm no longer over the column.   A mouseout event would provide the desired trigger, but near as I can tell, that is not available.  Is there a way to accomplish this with the existing features?

Thanks,

Dave

 

Rumen
Telerik team
 answered on 16 Feb 2017
1 answer
206 views

Hello

I have a fairly complex RadScheduler where a user can drop appointments from a RadGrid and the advanced edit form should open on row drop.

This works so far, the form opens. But it seems the form doesn't get initialised correctly. When submitting the form I get a long error message:

"Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors(). Parameter name: scriptControl"

 

When double-clicking the appointment in RadScheduler, submitting works just fine with the same advanced form, though.

I call this from Page_PreRender(object sender, EventArgs e)

RadSchedulerPlanning.ShowAdvancedEditForm(appointment);

 

Where would I call "ShowAdvancedEditForm()" correctly?

Peter Milchev
Telerik team
 answered on 16 Feb 2017
3 answers
105 views

I have an ASPX Site with Telerik AJAX, in a editable RadGrid with EditMode="EditForms", each time user press Return, system shows an Object Reference not set to an instance of an object.

RadGrid Definition

 

<telerik:RadGrid RenderMode="Lightweight" ID="GridSCG" runat="server" AutoGenerateColumns="False"
            AllowFilteringByColumn="True" AllowSorting="True" AllowPaging="True" Culture="es-MX"
            OnNeedDataSource="GridSCG_NeedDataSource" OnDeleteCommand="GridSCG_DeleteCommand"
            OnInsertCommand="GridSCG_InsertCommand" OnItemCreated="GridSCG_ItemCreated" OnUpdateCommand="GridSCG_UpdateCommand"
            CellSpacing="-1" GridLines="Both" OnItemDataBound="GridSCG_ItemDataBound" Skin="Telerik">
            
            <PagerStyle PageSizeControlType="RadDropDownList" Mode="NextPrevAndNumeric"></PagerStyle>
            <ClientSettings AllowKeyboardNavigation="true">
                <ClientEvents OnKeyPress="OnKeyPress" />
            </ClientSettings>
            <FilterMenu RenderMode="Lightweight"></FilterMenu>
            <HeaderContextMenu RenderMode="Lightweight"></HeaderContextMenu>
            <ClientSettings AllowKeyboardNavigation="true">
                <Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" AllowResizeToFit="true" />
                <ClientEvents OnRowDblClick="rowDblClick" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" FrozenColumnsCount="2"></Scrolling>
            </ClientSettings>

            <MasterTableView AutoGenerateColumns="False" InsertItemPageIndexAction="ShowItemOnCurrentPage" EditMode="EditForms"
                DataKeyNames="DTA_SECUENCIA" CommandItemDisplay="Top">
                <SortExpressions>
                    <telerik:GridSortExpression FieldName="DTA_SECUENCIA" SortOrder="Descending" />
                </SortExpressions>

This is the Error

[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Web.UI.GridDateTimeColumnEditor.set_Text(String value) +73
   Telerik.Web.UI.GridBoundColumn.OnDataBindColumn(Object sender, EventArgs e) +2669
   System.Web.UI.Control.OnDataBinding(EventArgs e) +84
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +150
   System.Web.UI.Control.DataBind() +17
   System.Web.UI.Control.DataBindChildren() +185

 

 

 

Vessy
Telerik team
 answered on 16 Feb 2017
0 answers
78 views

Is possible to detect Radspreadsheet Select all button is clicked? (Server or client code)

 

Regis L
Top achievements
Rank 1
 asked on 16 Feb 2017
4 answers
137 views

I have a Telerik.XamarinForms.DataControls.RadListView and added a SelectionChanged listener (because I can't find the documentation for ItemTapped method signature). 

In SelectionChanged I navigate to another page, but when the user comes back the item is still selected. So I'd like to clear the selection. 

How?

Gerry
Top achievements
Rank 1
 answered on 15 Feb 2017
1 answer
110 views

I'm trying to load the combobox that is inside the radgrid using the RadGrid1_ItemCommand, using the command to insert a new line into the radgrid that is empty, but the following error is displayed: Can not convert an object of type 'Telerik.Web.UI .GridCommandItem 'in type' Telerik.Web.UI.GridEditableItem. Here's a part of the code:

<telerik:RadGrid ID="RadGrid1" runat="server" ShowStatusBar="true" AllowSorting="true" SortingSettings-EnableSkinSortStyles="false"
                                      AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="True" AllowMultiRowSelection="true"
                                      HorizontalAlign="Center" PageSize="10" EnableViewState="false" >
                         <MasterTableView AutoGenerateColumns="false" CommandItemDisplay="Top" DataKeyNames="NRO_ITEM"  >
                             <NoRecordsTemplate>
                                 <div> Sem itens </div>
                             </NoRecordsTemplate>
                               <Columns>
                                   <telerik:GridBoundColumn UniqueName="TRB_LOTE_NRO" DataField="TRB_LOTE_NRO" HeaderText="TRB_LOTE_NRO"/>
                                   <telerik:GridBoundColumn UniqueName="QUANTIDADE" DataField="QUANTIDADE" DataType="System.Int32" HeaderText="QUANTIDADE"/>
                                   <telerik:GridBoundColumn UniqueName="TIPO" DataField="TIPO" HeaderText="TIPO"/>
                                   <telerik:GridBoundColumn UniqueName="DESCRICAO" DataField="DESCRICAO" HeaderText="DESCRICAO" />
                                   <telerik:GridBoundColumn UniqueName="ID_RT" DataField="ID_RT" HeaderText="RT" />
                                   <telerik:GridBoundColumn UniqueName="ID_NRO_GMM" DataField="ID_NRO_GMM" HeaderText="ID_NRO_GMM"  DataType="System.Int32" Visible="false" />
                                   <telerik:GridBoundColumn UniqueName="NRO_ITEM" DataField="NRO_ITEM" HeaderText="NRO_ITEM" DataType="System.Int32" Visible="false" />
                                   <telerik:GridEditCommandColumn HeaderStyle-Width="100px" HeaderText="Edita" />
                                   <telerik:GridButtonColumn CommandName="Delete" UniqueName="DeleteColumn" HeaderStyle-Width="100px" Text="Delete"/>
                               </Columns>
                       <EditFormSettings EditFormType="Template">
                       <FormTemplate>
                           <div style="width: 300px" >
                               <div style="margin:5px;">
                                   <asp:Label ID="TRB_LOTE_NROLbl" runat="server" Text="Trb_Lote_Nro:" /> <telerik:RadComboBox ID="TRB_LOTE_NROCmbGrid" runat="server" Text='<%# Bind("TRB_LOTE_NRO") %>' />
                               </div>
                               <div style="margin:5px;">
                                   <asp:Label ID="QUANTIDADELbl" runat="server" Text="Quantidade:" meta:resourceKey="QUANTIDADELbl"/> <asp:TextBox ID="QUANTIDADETxtGrid" runat="server" Text='<%# Bind("QUANTIDADE") %>'/>
                               </div>
                               <div style="margin:5px;">
                                   <asp:Label ID="TIPOLbl" runat="server" Text="Tipo:" /> <telerik:RadComboBox ID="TIPOCmbGrid" runat="server" />
                               </div>
                               <div style="margin:5px;">
                                   <asp:Label ID="DESCRICAOLbl" runat="server" Text="Descrição:"/> <asp:TextBox ID="DESCRICAOTxtGrid" runat="server" Text='<%# Bind("DESCRICAO") %>'/>
                               </div>
                               <div style="margin:5px;">
                                   <asp:Label ID="ID_RT" runat="server" Text="RT:"/> <telerik:RadComboBox ID="ID_RTCmbGrid" runat="server" Text='<%# Bind("ID_RT") %>' />
                               </div>
                               <div style="margin:10px;text-align:right;">
                                   <telerik:RadButton ID="btnUpdate" Text='<%# IIf((TypeOf (Container) Is GridEditFormInsertItem), AddJS, UpdateJS) %>' runat="server" CommandName='<%# IIf((TypeOf (Container) Is GridEditFormInsertItem), "PerformInsert", "Update")%>'/>
                                   <telerik:RadButton ID="btnCancel" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancelar" />
                               </div>
                           </div>
                       </FormTemplate>
                   </EditFormSettings>
               </MasterTableView>
               <ClientSettings  EnableRowHoverStyle="true">
                   <Selecting AllowRowSelect="true" />
                   <ClientEvents OnRowDblClick="RowDblClick" />
                    <Scrolling AllowScroll="True" />
               </ClientSettings>
           </telerik:RadGrid>
Private Sub RadGrid1_ItemCommand(sender As Object, e As GridCommandEventArgs) Handles RadGrid1.ItemCommand
 
       If e.CommandName = RadGrid.InitInsertCommandName Then '"Add new" button clicked
           e.Canceled = True
           Dim newValues As New System.Collections.Specialized.ListDictionary()
           newValues("ID_RT") = ""
           newValues("DESCRICAO") = ""
           newValues("QUANTIDADE") = ""
           newValues("TRB_LOTE_NRO") = ""
           newValues("NRO_ITEM") = ""
           e.Item.OwnerTableView.InsertItemPageIndexAction = GridInsertItemPageIndexAction.ShowItemOnCurrentPage
           e.Item.OwnerTableView.InsertItem(newValues)
 
           'If Not (TypeOf e.Item Is IGridInsertItem) Then
 
           Dim editform As GridEditFormItem = DirectCast(DirectCast(e.Item, Telerik.Web.UI.GridDataItem).EditFormItem, GridEditFormItem)
           Dim comboTrbLote As RadComboBox = DirectCast(editform.FindControl("TRB_LOTE_NROCmbGrid"), RadComboBox)
           Dim comboTipo As RadComboBox = DirectCast(editform.FindControl("TIPOCmbGrid"), RadComboBox)
           Dim comboRT As RadComboBox = DirectCast(editform.FindControl("ID_RTCmbGrid"), RadComboBox)
 
           Expressao = "SELECT DISTINCT ID_EMP_ESTAB FROM EMPRESAS WHERE ESTAB= '" & DepartamentoCmb.Text & "'"
 
 
           TabelaAdapter = New OleDbDataAdapter(Expressao, conexao)
           'preenche o datatable
           Tabela = New DataTable
           TabelaAdapter.Fill(Tabela)
           id_estab = Tabela.Rows(0).Item(0).ToString
 
 
           Expressao = "SELECT TRABALHOS.ID_NRO_TRAB, TRABALHOS.ID_NRO_MAQ, TRABALHOS.VERSAO FROM TRABALHOS, CONTRATOS " &
                   "WHERE TRABALHOS.ID_CONTRATO = CONTRATOS.ID_CONTRATO AND CONTRATOS.ATIVO=TRUE AND CONTRATOS.ID_EMP_ESTAB = " & id_estab &
                  " ORDER BY TRABALHOS.ID_NRO_TRAB, TRABALHOS.ID_NRO_MAQ, TRABALHOS.VERSAO ASC"
 
           TabelaAdapter = New OleDbDataAdapter(Expressao, conexao)
           'preenche o datatable
           Tabela = New DataTable
           TabelaAdapter.Fill(Tabela)
           For i = 0 To Tabela.Rows.Count - 1
               comboTrbLote.Items.Add(Tabela.Rows(i).Item(0).ToString & "." & Tabela.Rows(i).Item(1).ToString & "-" & Tabela.Rows(i).Item(2).ToString)
           Next
 
 
           Expressao = "SELECT MATERIAL FROM TIPO_MATERIAL_GMM"
           TabelaAdapter = New OleDbDataAdapter(Expressao, conexao)
           Tabela = New DataTable
           TabelaAdapter.Fill(Tabela)
           For i = 0 To Tabela.Rows.Count - 1
               comboTipo.Items.Add(Tabela.Rows(i).Item(0).ToString)
           Next
 
 
           Expressao = "SELECT CONTRATOS.ID_CONTRATO, CONTRATOS.ID_EMP_ESTAB, ID_RT " &
                   "FROM EMPRESAS INNER JOIN (CONTRATOS INNER JOIN RTS ON CONTRATOS.ID_CONTRATO = RTS.ID_CONTRATO) " &
                   "ON EMPRESAS.ID_EMP_ESTAB = CONTRATOS.ID_EMP_ESTAB WHERE CONTRATOS.ATIVO=TRUE AND EMPRESAS.ID_EMP_ESTAB = " & id_estab &
                  " ORDER BY ID_RT"
 
 
           TabelaAdapter = New OleDbDataAdapter(Expressao, conexao)
           'preenche o datatable
           Tabela = New DataTable
           TabelaAdapter.Fill(Tabela)
           For i = 0 To Tabela.Rows.Count - 1
               comboRT.Items.Add(Tabela.Rows(i).Item(2).ToString)
           Next
 
 
       ElseIf (e.CommandName = RadGrid.RebindGridCommandName AndAlso e.Item.OwnerTableView.IsItemInserted) Then
           e.Canceled = True
       Else
           Dim editColumn As GridEditCommandColumn = CType(RadGrid1.MasterTableView.GetColumn("EditCommandColumn"), GridEditCommandColumn)
           If Not editColumn.Visible Then
               editColumn.Visible = True
           End If
       End If
   End Sub
I'll be waiting, thanks
greetings
Wiliam
Top achievements
Rank 1
 answered on 15 Feb 2017
2 answers
214 views

I've done some considerable searching and experimentation on newline mode. I understand that newlinemode.br or .div are necessary for formatting, alignment, etc. However, .div and .p produce some undesirable results. Both in your online demo and in my dev site.

Take the following simple example in html mode

<div class="im-a-div">
put your cursor after me and press enter 3-4 times

</div>

Switch to design mode and press enter 3 or 4 times.

The result looks like this:

<div class="im-a-div">
dddd
</div>
<p class="im-a-div">&nbsp;</p>
<p class="im-a-div">&nbsp;</p>
<p class="im-a-div">&nbsp;</p>
<p class="im-a-div">&nbsp;</p>

Is there some sort of custom filter, or override that I could apply to the newline that would prevent the classes from being applied to these new block elements - and allow them to be inserted inside the <div> that I had intended to work inside? These new <p>'s aren't even inside the div that I was working inside of, and are being placed afterward.

Ideally, the resulting html should look something like

<div class="im-a-div">

<p>nbsp;</p>
<p>nbsp;</p>
<p>nbsp;</p>

</div>

Rumen
Telerik team
 answered on 15 Feb 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?