Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
113 views
I am using Telerik 2014.2.618 version. I am using Rad Editor on a page with NewLineMode propert set to P.
When the user enters some content and press enter key, a P tag is created. However, when a user enters some content and presses down arrow key, a new P tag is not generated. This is creating invalid html and causing rendering issues for us. 
Ianko
Telerik team
 answered on 24 Jan 2015
9 answers
852 views

Hello,

I face a issue with pagesize change event of RadGrid. This event is called two times when a user clicks on "Change" link.
I have set  AllowPaging="True", AllowCustomPaging="True", PagerStyle-Mode="NextPrevNumericAndAdvanced"  
properties of Radgrid related to paging.

In code I have following events...

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load      
    
If Not Page.IsPostBack Then        
        BindGrid()
    
End If
End Sub 

Private Sub BindGrid()  
    '''' grid binding code here using datasource as datatable
    dt = .....
    If dt.Rows.Count > 0 Then
        rGridSubscriptions.VirtualItemCount = dt.Rows(0).Item("total_rows")
    Else
        rGridSubscriptions.VirtualItemCount = 0
    End If
End Sub

Private Sub
rGridSubscriptions_PageSizeChanged(ByVal source As Object, ByVal e As Telerik.Web.UI.GridPageSizeChangedEventArgs) Handles rGridSubscriptions.PageSizeChanged    
    ViewState(
"maxRows") = e.NewPageSize
    BindGrid()
End Sub

This PageSizeChanged is called twice when "Change" link is clicked and hence Bindgrid is called twice. I am using Telerik's Q2 2008 version.
Please if anyone can solve this issue it would be of greate help.

Thanks in advance
Sups

Pavlina
Telerik team
 answered on 23 Jan 2015
1 answer
166 views
I am attempting to load user controls inside a PlaceHolder using a RadMenu. Ajax manager is updating both the menu and the placeholder. When I click on the menu item nothing happens. Initially, when the page loads the homeview.ascx user control does load, but it is not updated on menuitem click.

 ASPX Page

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                        <AjaxSettings>
                            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                                <UpdatedControls>
                                    <telerik:AjaxUpdatedControl ControlID="MainNav" />
                                    <telerik:AjaxUpdatedControl ControlID="BodyContent" LoadingPanelID="RadAjaxLoadingPanel1" />
                                </UpdatedControls>
                            </telerik:AjaxSetting>
                        </AjaxSettings>
                    </telerik:RadAjaxManager>
                <!-- Main Menu -->
                    <div class="menu-wrapper" style="border-top: solid 40px #b1ddab;">
                        <telerik:RadMenu runat="server" ID="MainNav" EnableEmbeddedSkins="false" OnItemClick="MainNav_OnItemClick" CssClass="desktop_nav_menu" >
                            <Items>
                                <telerik:RadMenuItem Text="<%$ Resources:Main, MasterHome %>" />
                                <telerik:RadMenuItem Text="<%$ Resources:Main, MasterTraining %>" />
                                <telerik:RadMenuItem Text="<%$ Resources:Main, MasterSupport %>" />
                            </Items>
                        </telerik:RadMenu>
                    </div>             
                <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>
                <asp:PlaceHolder ID="BodyContent" runat="server">
                      
                </asp:PlaceHolder>


Code Behind

protected void Page_Load(object sender, EventArgs e)
    {
        this.LoadView();
    }
 
private string LoadedControlName
    {
        get
        {
            return (this.ViewState[ViewStateKeys.LoadedControlName] as string) ?? defaultContentControl;
        }
        set
        {
            this.ViewState[ViewStateKeys.LoadedControlName] = value;
        }
    }
 
private void LoadView()
    {
        this.LoadView(this.LoadedControlName);
    }
 
    private void LoadView(string viewName)
    {
        Control control = this.LoadControl(string.Concat(SitePaths.Views, viewName));
        control.ID = viewName;
        this.LoadedControlName = viewName;
        this.BodyContent.Controls.Clear();
        this.BodyContent.Controls.Add(control);
    }
 
    public void MainNav_OnItemClick(object sender, RadMenuEventArgs e)
    {
        RadMenuItem currentItem = e.Item;
        string currentItemText = currentItem.Text;
        string controlPath = string.Empty;
        switch (currentItemText)
        {
            case ("Home"):
                controlPath = DefaultViews.Home;
                break;
            case ("Training"):
                controlPath = DefaultViews.Training;
                break;
            case ("Support"):
                controlPath = DefaultViews.Support;
                break;
            default:
                break;
        }
        if (!String.IsNullOrEmpty(controlPath))
        {
            this.LoadView(controlPath);
        }
    }

View Constants

public class SitePaths
{
    public const string Views = "~/Views/";
}
 
public class ViewStateKeys
{
    public const string LoadedControlName = "LoadedControlName";
}
  
public class DefaultViews
{
    public const string Home = "HomeView.ascx";
    public const string Training = "TrainingView.ascx";
    public const string Support = "SupportView.ascx";
}

Ashley
Top achievements
Rank 1
 answered on 23 Jan 2015
1 answer
184 views
I have a RadGrid with an EditForm containing a RadEditor. The EditForm is shown in a popup and is set to modal.  When I press the 'Toggle Full screen' button, the Editor is 'behind' the modal.  So the area is greyed out and you cannot push any button available in the editor.

Can someone please help me to fix this?

<telerik:RadGrid ID="grdTicketHistory" runat="server" Width="100%" AutoGenerateColumns="false" Skin="Silk" OnNeedDataSource="grdTicketHistory_NeedDataSource" OnItemDataBound="grdTicketHistory_ItemDataBound" OnPreRender="grdTicketHistory_PreRender"
OnUpdateCommand="grdTicketHistory_UpdateCommand" OnDeleteCommand="grdTicketHistory_DeleteCommand" OnInsertCommand="grdTicketHistory_InsertCommand">
                            <MasterTableView AllowSorting="true" Width="100%" EditMode="PopUp" AllowPaging="true" PageSize="10" AllowFilteringByColumn="true" DataKeyNames="TicketLogID"
                                CommandItemDisplay="Top" ShowHeader="false" >
                                <Columns>
                                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" ItemStyle-Width="30px"></telerik:GridEditCommandColumn>
                                    <telerik:GridButtonColumn UniqueName="DeleteCommandColumn" Text="Delete" CommandName="Delete" ButtonType="ImageButton"
                                        ConfirmText="Are you sure you want to delete this record?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" />
                                </Columns>
                                <DetailItemTemplate>
                                    <asp:Table ID="tblDetailItemTemplate" runat="server" Width="100%">
                                        <asp:TableRow>
                                                    <asp:TableRow>
                                                        <asp:TableCell>
                                                            <telerik:RadEditor runat="server" ID="txtLogText" Enabled="false" EditModes="Preview" Height="250px" ></telerik:RadEditor>   
                                                        </asp:TableCell>
                                                    </asp:TableRow>
                                                </asp:Table>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                    </asp:Table>                                       
                                </DetailItemTemplate>
                                <EditFormSettings EditFormType="Template" >
                                    <PopUpSettings Modal="true" Width="1000px" ZIndex="3000" />
                                    <FormTemplate>                                       
                                        <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none" style="border-collapse: collapse;">
                                            <tr>
                                                            <td colspan="2">
                                                                <telerik:RadEditor runat="server" ID="txtLogText" TabIndex="10" ToolsFile="~/xml/ToolsFile.xml"  NewLineMode="Br" OnClientLoad="OnClientLoadRadEditor"></telerik:RadEditor>           
                                                                <asp:CustomValidator id="valLogText" runat="server" ControlToValidate="txtLogText" ErrorMessage="- Text is mandatory" ToolTip="Text is mandatory"> <img src="/cmit/Images/warning.gif" style="border:0" alt=""/></asp:CustomValidator>
                                                            </td>
                                            </tr>
                                            <tr>
                                                <td align="right" style="white-space:normal" colspan="2">
                                                    <asp:Button ID="btnUpdate" TabIndex="11" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button
                                                    <asp:Button ID="btnCancel" TabIndex="12" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button>
                                                </td>
                                            </tr>
                                        </table>
                                         
                                    </FormTemplate>
                                    <EditColumn ButtonType="ImageButton" />
                                </EditFormSettings>
                            </MasterTableView>
                        </telerik:RadGrid>
                   
    



Ianko
Telerik team
 answered on 23 Jan 2015
1 answer
109 views
Hi,

Does the ticker control support multiple lines?  I have a datatable that returns 5 rows.  I want the ticker to produce 5 lines as well, i.e. not overwrite the orginal one 5 times?

Is this possible?

Thanks

Andy.
Slav
Telerik team
 answered on 23 Jan 2015
6 answers
285 views
I have this RadWindow in a parent page:

<script type="text/javascript">
 function ShowWindow() {
 var oWnd = window.radopen('Window1.aspx', 'window1');
}        
</script>
 
<body>
  <form id="form1" runat="server">
    <div>
      <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
      </telerik:RadScriptManager>
      <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
          </telerik:RadWindowManager>
...........

This is how I open the RadWindow from code behind of the parent page:
...
else
   {
      Session["fatherMessageID"] = id;
      string script = "<script language='javascript' type='text/javascript'>Sys.Application.add_load(ShowWindow);</script>";
      ClientScript.RegisterStartupScript(this.GetType(), "showWindow", script);
    }

This is how I close the RadWindow from inside the RadWindow:
<script type="text/javascript">
        function GetRadWindow() {
            var oWnd = null;
            if (window.radWindow) oWnd = window.radWindow;
            else if (window.frameElement.radWindow) oWnd = window.frameElement.radWindow;
            return oWnd;
        }
        function CloseWindow() {
            var oWnd = GetRadWindow();
            oWnd.close()
        }
    </script>

Calling the script from a button inside the RadWindow:
string script = "<script language='javascript' type='text/javascript'>Sys.Application.add_load(CloseWindow);</script>";
ClientScript.RegisterStartupScript(this.GetType(), "CloseWindow", script);

The problem I am experiencing is that the RadWindow after being opened and closed the first time, keeps reopening later on on page load and on click of any controls on the parent page.
How can I resolve this problem?

Thanks for supporting
Felice
Felice
Top achievements
Rank 1
 answered on 23 Jan 2015
2 answers
196 views
This may be premature.  This may or may not be an Ajax problem, but here goes.

I have identical code deployed to 2 web servers (dev and production).  There are 2 main problems as far as I can tell, both Internet Explorer related.  On one site the app works perfectly in all browsers including IE.  In the other it works perfectly in Chrome and Firefox but not IE. 

The page has a master page containing a RadScriptManager,  RadCodeBlock,   RadStyleSheetManager,  RadSkinManager, and and asp:Repeater populated with Asp:Link buttons.
The page itself contains a RadInputManager,  RadWindowManager,  RadToolTipManager, 2  RadCodeBlocks, and the  RadGrid itself.

Problem 1 is that in IE, the asp:Repeater is disabled.  The set of links is populated and displays correctly but they simply don't work.

Problem 2 is that various hyperlinks in the RadGrid also do not work in IE. (Also generated in code.)  The idea is that these hyperlinks call a JavaScript function which in turn calls up a popup window.  

(As far as I can remember I copied this pattern directly from Telerik.
The calls are like this:   var oWnd = window.radopen("EditWindow.aspx?Id=" + Id, "Add Entry For Record " + Id);   )  

All these calls crash, giving a message saying that the window object is null.

Troubleshooting this problem is complicated by the fact that I do not have direct access to the production server due to security concerns.  A friend of mine has suggested that this might be due to some sort of permissions problem in IIS.

Anyone else have a problem like this?
Boris
Top achievements
Rank 1
 answered on 23 Jan 2015
6 answers
401 views
Hi guys,


We are using Telerik  ASP.NET Ajax Controls for some time without embedded resources by setting the appropriate configuration settings:


<add key="Telerik.EnableEmbeddedSkins" value="false"/>

<add key="Telerik.EnableEmbeddedBaseStylesheet" value="false"/>

<add key="Telerik.EnableEmbeddedScripts" value="false"/>        

 

We have only one JavaScript file, Telerik.js , that contains all java script files for all controls and one .css file, Common.css,  that contains all common styles for all controls. For each skin, we create a single css file with all  controls styles for that skin.

Our problem is when we update the Telerik framework, because we have to regenerate the files mentioned above. It seems that although we are following
the order specified in the documentation bellow,

http://www.telerik.com/help/aspnet-ajax/introduction-disabling-embedded-resources.html

when merging the java script files, we end up with Java Script errors.

We are looking for some help regarding the merging procedure or eventually a tool that, for instance, we’ll let us select the controls we want to use and will generate a single .js file  with all the scripts, and single .css file with all common styles.
 

Best regards,
Dan Ciobanu
Christian
Top achievements
Rank 1
 answered on 23 Jan 2015
2 answers
217 views
Hi !
I have a radmenu in my masterpage that updates the content of the "mainarea"  with is an iFrame wrapped in a updatepanel.

If I  use a radgrid and try to delete a item the confirmwindow is always displayed centered regarding to my iFrame.
This is not very nice since the user cannot se the confimwindow if trying to delete an item far up or far down in the grid.
I' thinking the user shouldn't have to scroll to find the window.

If I use ConfirmDialogType="Classic" it works nice and the window is showing besides the selected row.
If I use ConfirmDialogType="Radwindow"  outside the iFrame it also works nice .

I would like the window to show up besides the area where I clicked or  centred in relation to the screen.

Anyone nows how to solve this issue ?

Regards
Stefan
Stefan
Top achievements
Rank 1
 answered on 23 Jan 2015
1 answer
130 views
<telerik:RadGrid ID="grdLogframe" OnNeedDataSource="grdLogframe_NeedDataSource" <br>                    OnItemDataBound="grdLogframe_ItemDataBound" OnPreRender="grdLogframe_PreRender" runat="server" AutoGenerateColumns="false"><br>                    <MasterTableView DataKeyNames="NodeID" Name="tblLogframe"><br>                        <Columns><br>                            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"></telerik:GridEditCommandColumn><br>                            <telerik:GridBoundColumn UniqueName="NodeID" DataField="NodeID" Visible="false"></telerik:GridBoundColumn><br>                            <telerik:GridTemplateColumn UniqueName="NodeText" DataField="NodeText" HeaderText="Objectives"><br>                                <ItemTemplate><br>                                    <%# Eval("ProjectLogframeNodeType.NodeTypeName") %>&nbsp;:&nbsp;<%# Eval("NodeText") %><br>                                </ItemTemplate><br>                            </telerik:GridTemplateColumn><br>                            <telerik:GridTemplateColumn UniqueName="indicators"><br>                                <itemtemplate><br>                                       <telerik:RadGrid ID="grdIndicators" runat="server" AutoGenerateColumns="false" ShowHeader="true" OnPreRender="grdIndicators_PreRender" OnItemCreated="grdIndicators_ItemCreated" OnItemDataBound="grdIndicators_ItemDataBound"><br>                                           <MasterTableView DataKeyNames="ProjectLogframeIndicatorID" <br>                                               NoMasterRecordsText ="Indicators not defined yet" Name="tblIndicators"><br>                                               <Columns><br>                                                   <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"></telerik:GridEditCommandColumn><br>                                                   <telerik:GridBoundColumn HeaderText="Project Indicators" UniqueName="Description" DataField="Description"></telerik:GridBoundColumn><br>                                                   <telerik:GridBoundColumn HeaderText="Corporate Indicators" UniqueName="CorpResultFrameworkIndicatorID" DataField="CorpResultFrameworkIndicatorID"></telerik:GridBoundColumn><br>                                                   <telerik:GridBoundColumn HeaderText="Programme Indicators" UniqueName="ProgrameIndicatorID" DataField="ProgrameIndicatorID"></telerik:GridBoundColumn><br>                                                   <telerik:GridBoundColumn HeaderText="Baseline" UniqueName="Baseline" DataField="Baseline"></telerik:GridBoundColumn><br>                                                   <telerik:GridBoundColumn HeaderText="Targets" UniqueName="Targets" DataField="Targets"></telerik:GridBoundColumn><br>                                                   <telerik:GridBoundColumn HeaderText="Means of Verifications" UniqueName="MeansOfVerification" DataField="MeansOfVerification"></telerik:GridBoundColumn><br>                                               </Columns><br>                                               <CommandItemSettings AddNewRecordText="Add Indicator" AddNewRecordImageUrl="../Img/insert.png" /><br>                                           </MasterTableView><br>                                       </telerik:RadGrid><br>                                </itemtemplate><br>                            </telerik:GridTemplateColumn>
...

I am doing the nested grid binding inside the item created of the outer grid.
the issue is with the CRUD operations on the inner grids, whenever they post back the whole grid structure is recreated and the post back event is lost.
This is manifested specifically with the InitInsert and InitUpdate commands on inner grids. the grid refreshes but the action is lost.

how can i perform this?

thank you
Angel Petrov
Telerik team
 answered on 23 Jan 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?