Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
181 views
I have a RadWindow opened, and inside of this i open another radwindow. I want to resize the parent RadWindow, after popup radwindow is loaded. How can i achieve this behavior?
Georgi Tunev
Telerik team
 answered on 03 Nov 2010
4 answers
83 views
Hi,

I wan to change green color of WEB20 skin with some different color. I found the file Skins\Web20\Rating.Web20.css and changed the color code d4ffbc with other one... but found no effects of these changes on my project...

Please tell me what else I need to do ?
Abdul
Top achievements
Rank 2
 answered on 03 Nov 2010
2 answers
115 views
Hi,

When I use StaticHeaders="true" there is extra space coming at the end of the page. I am not sure if it is due to the same reason, but it is there.

For some scrolling it is fine, but when data is much more and scrolling is more, the page height increases. Please see attached screenshots with extra space and with no extra space. The only difference between both is having different number of data in the grid.

Also, when I click the checkbox in the grid, page scrolls to the end and then I need to scroll back to top to go to the grid again.
Atit Thaker
Top achievements
Rank 1
 answered on 03 Nov 2010
13 answers
298 views
Hey I am trying to remove the line after I am adding a new record into the RadGrid
I am writing following code into the RadGrid_InsertCommand for that.

grdLidEffectiveDateRanges.MasterTableView.ClearEditItems();

Same thing is working for me into the RadGrid_UpdateCommand call,

Can anyone help me out what is the method call to clear the line after Insertion of a new row?

Thanks,
Nikunj Patel
Princy
Top achievements
Rank 2
 answered on 03 Nov 2010
2 answers
167 views
Good day!
When I turn my browser's window all grids look well (you can see it at pic1), but two wide RadGrids overlaps the site's menu :( (you can see it at pic2)
what can I do with this grids for them to look well? all the code & style in them are like in other grids. all the columns in them are necessary.
lina fetisova
Top achievements
Rank 1
 answered on 03 Nov 2010
3 answers
512 views
Here's a layout of a portion of our site.  We are using Visual Studio 2010, C# 4.0, and Telerik version 2010.1.519.40

Main.Master
 - RadScriptManager (rsmMain)
 - RadAjaxManager (ramMain)
 - RadAjaxLoadingPanel (ralpMain)
 - asp:Panel  (pnlMain, code behind sets ramMain.AjaxSettings.AddAjaxSetting(pnlUpdateMain, pnlUpdateMain, ralpMain);

MainPage.aspx : Main.Master
 - Banner.ascx (with RadTabStrip that loads a separate usercontrol per tab using Page.LoadControl)
   - Tab1.ascx (loaded by default when page loads)
     - InnerControl1.ascx
       - RadScriptBlock with alert('inner control 1');
   - Tab2.ascx
     - InnerControlX.ascx
       - RadScriptBlock with alert('inner control X');

When Tab1.ascx is loaded, all javascript/jquery works for that tab and it's child controls
When we click on the second tab and load Tab2.ascx, none of the javascript has been rendered to the page.

I've found tons of posts about this particular situation, but none have worked that allow any javascript to function inside of the usercontrols.  I've tried:
  • ScriptManager.RegisterClientScriptInclude to inject an external script file into the control
  • ScriptManager.RegisterStartupScript to inject script to run on load

Only thing that has partially worked is placing all of the javascript needed for the dynamic controls on MainPage.aspx.  In this case, I can call functions from the OnClientClick of buttons, but jQuery can't access the controls inside of the usercontrols because of the partial page loads.

Are there any suggestions?

NOTE: Disabling this line of code makes everything work as expected.
  ramMain.AjaxSettings.AddAjaxSetting(pnlUpdateMain, pnlUpdateMain, ralpMain);

Here is a demo you can use to recreate this problem.

AjaxifiedTabDemo.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AjaxifiedTabDemo.aspx.cs" Inherits="AjaxifiedTabDemo" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <script type="text/javascript">
        function OnTabSelecting(sender, args) {
            if (args.get_tab().get_pageViewID()) {
                // If this tab is already loaded, stop postback
                args.get_tab().set_postBack(false);
            }
        }    
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" />
    <telerik:RadAjaxLoadingPanel ID="ralpMain" runat="server" />
    <asp:Panel ID="pnlContentMain" runat="server">
        <telerik:RadTabStrip OnClientTabSelecting="OnTabSelecting" ID="rtsDefault" AutoPostBack="true"
            SelectedIndex="0" runat="server" MultiPageID="rmpDefault"
            OnTabClick="rtsDefault_TabClick">
            <Tabs>
                <telerik:RadTab Text="Tab 1" />
                <telerik:RadTab Text="Tab 2" />
            </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="rmpDefault" runat="server" SelectedIndex="0" OnPageViewCreated="rmpDefault_PageViewCreated">
        </telerik:RadMultiPage>
    </asp:Panel>
    </form>
</body>
</html>

AjaxifiedTabDemo.aspx.cs
using System;
using System.Web.UI;
using Telerik.Web.UI;
 
public partial class AjaxifiedTabDemo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadAjaxManager1, pnlContentMain, ralpMain);
        if (!Page.IsPostBack) AddPageView(rtsDefault.FindTabByText("Tab 1"));
    }
 
    protected void rtsDefault_TabClick(object sender, RadTabStripEventArgs e)
    {
        // Client side code will block this event if this tab has already been created.
        AddPageView(e.Tab);
        e.Tab.PageView.Selected = true;
    }
 
    protected void rmpDefault_PageViewCreated(object sender, RadMultiPageEventArgs e)
    {
        string controlName = (e.PageView.ID == "Tab1") ? "Tab1Control.ascx" : "Tab2Control.ascx";
        Control tabUserControl = Page.LoadControl(controlName);
        tabUserControl.ID = e.PageView.ID + "_userControl";
        e.PageView.Controls.Add(tabUserControl);
    }
 
    private void AddPageView(RadTab tab)
    {
        RadPageView pageView = new RadPageView { ID = tab.Text.Replace(" ", "") };
        pageView.Attributes["controlLoaded"] = "0";
        rmpDefault.PageViews.Add(pageView);
        tab.PageViewID = pageView.ID;
    }
}

Tab1Control.ascx -- nothing in code behind but empty Page_Load()
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Tab1Control.ascx.cs" Inherits="RadControlsWebApp1.Tab1Control" %>
<%@ Register TagPrefix="uc" TagName="InnerControl1" Src="~/InnerControl1.ascx" %>
<uc:InnerControl1 id="ucInnerControl" runat="server"></uc:InnerControl1>
This is Tab 1
 
<telerik:RadScriptBlock ID="rsbTab1" runat="server">
    <script language="javascript" type="text/javascript">
        function tab1Click(sender) {
            alert('thanks for clicking a button on tab 1!  ' + sender.id);
            return false;
        }
    </script>
</telerik:RadScriptBlock>
 
<asp:Button ID="btnOnTab1" runat="server" Text="Button in tab 1" OnClientClick="return tab1Click(this);" />

Tab2Control.ascx -- nothing in code behind but empty Page_Load()
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Tab2Control.ascx.cs" Inherits="RadControlsWebApp1.Tab2Control" %>
<%@ Register TagPrefix="uc" TagName="InnerControl2" Src="~/InnerControl2.ascx" %>
<uc:InnerControl2 id="ucInnerControl2" runat="server"></uc:InnerControl2>
This is Tab 2
 
<telerik:RadScriptBlock ID="rsbTab2" runat="server">
    <script language="javascript" type="text/javascript">
        function tab2Click(sender) {
            alert('thanks for clicking a button on tab 2!  ' + sender.id);
            return false;
        }
    </script>
</telerik:RadScriptBlock>
 
<asp:Button ID="btnOnTab2" runat="server" Text="Button in tab 2" OnClientClick="return tab2Click(this);" />

InnerControl1.ascx -- nothing in code behind but empty Page_Load()
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="InnerControl1.ascx.cs"
    Inherits="RadControlsWebApp1.InnerControl1" %>
<telerik:RadScriptBlock ID="rsbInnerControl" runat="server">
    <script language="javascript" type="text/javascript">
        function internalClick(sender) {
            alert('thanks for clicking me!  ' + sender.id);
            return false;
        }
    </script>
</telerik:RadScriptBlock>
<asp:Button ID="btnInnerButton" runat="server" Text="Button in inner control 1" OnClientClick="return internalClick(this);" />

InnerControl2.ascx -- nothing in code behind but empty Page_Load()
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="InnerControl2.ascx.cs"
    Inherits="RadControlsWebApp1.InnerControl2" %>
<telerik:RadScriptBlock ID="rsbInnerControl2" runat="server">
    <script language="javascript" type="text/javascript">
        function internalClick2(sender) {
            alert('thanks for clicking me on tab 2!  ' + sender.id);
            return false;
        }
    </script>
</telerik:RadScriptBlock>
<asp:Button ID="btnInnerButton" runat="server" Text="Button in inner control 2" OnClientClick="return internalClick2(this);" />
Thad
Top achievements
Rank 2
 answered on 02 Nov 2010
2 answers
394 views
I'm populating a DataTable at runtime, which is the DataSource for a RadGrid.  It uses paging, and I've set IgnorePaging="true" in ExportSettings of the grid.  Yet, it exports only the current page and not the entire DataTable.

Your help is very much appreciated.
Kaiser
Top achievements
Rank 1
 answered on 02 Nov 2010
1 answer
274 views
Hi,

I store inflation percentages as values between 0-1 in my database (e.g. 0.03 would equal 3%) and use a DataFormatString to display the data correctly in the gird- {0:#.#%}.

Whilst this works for displaying the percentages in the grid, I use RadNumericTextBoxes in a popup edit form and set the type to Percent but the values are being displayed as 0.03. Is there any way to format the NumericTextboxes to display the values in the same way as the grid?

Thanks

JH
Pavlina
Telerik team
 answered on 02 Nov 2010
4 answers
146 views
Hi folks

I'm trying to get to grips with using RadEditor, but I'm having trouble with what I believe is a rendering/CSS issue. Could anybody tell me what I'm doing wrong? I have a RadEditor that refuses to display itself properly in Firefox, with the Content area not displayed - this appears to be because the markup generated for the corresponding TEXTAREA element is styled with display:none; which according to Firebug is originating from an element.style style - this looks like some default styling, which makes me think that I have missed an important CSS component from my ASP.NET code for the control:

<trk:RadEditor ID="radCommentEditor1" runat="server" EditModes="Design" Visible="true"
CssClass="~/stylesheets/trk/Editor.Default.css"
ContentAreaCssFile="~/stylesheets/trk/EditorContentArea_RTL.css"
TableLayoutCssFile="~/stylesheets/trk/TableLayoutCss.css"
Width="500px" Height="200px" Skin="Simple" Enabled="true" AutoResizeHeight="True"
ForeColor="SteelBlue" MaxHtmlLength="250" MaxTextLength="250"
Font-Names="Arial" Font-Size="Small"  >
<Content>
<p>Type here</p>
</Content>
<Tools>
          <trk:EditorToolGroup>
                    <trk:EditorTool Name="Bold" />
                    <trk:EditorTool Name="Italic" />
                    <trk:EditorTool Name="Underline" />
                     <trk:EditorTool Name="Cut" />
                    <trk:EditorTool Name="Copy" />
                    <trk:EditorTool Name="Paste" />
                    <trk:EditorTool Name="Undo" />
                    <trk:EditorTool Name="Redo" />
                    <trk:EditorSeparator />
                    <trk:EditorTool Name="Zoom" />
                    <trk:EditorTool Name="AjaxSpellCheck" />
                </trk:EditorToolGroup>
            </Tools>
</trk:RadEditor>

Given that all the stated stylesheets have been copied from the demo styles, i what else should I be including to get the content to display properly?

The problem is even worse in IExplorer, with the toolbar also failing to render, so I'm definitely going wrong somewhere, but I can't seem to find a lead in any of the documentation or examples!

Can anybody point me in the right direction, or suggest a better guide to coding for the RadEditor?

Thanks very much in advance

Regards


Paul Robertson
Top achievements
Rank 1
 answered on 02 Nov 2010
1 answer
92 views
I am getting an Internet Explorer cannot display the webpage when I try to upload an excel spreadsheet, the error is really specific to this excel spreadsheet.

The sheet is not that big 54kb but contains links and a lot of formulas.

Trying to pinpoint the issue from the original page webpage I did a really simple page, the radUpload control and 1 button with no code behind. If I choose the file and click the button I get "Internet Explorer cannot display the webpage".

If I edit the excel spreadsheet to remove all links/formulas and redo the upload everything works great (no "Internet Explorer cannot display the webpage").

Any help would be appreciated as the excel file needs to be uploaded as is with links and formulas.

Thanks
Alex
Top achievements
Rank 2
 answered on 02 Nov 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
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
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?