Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
111 views
I have a page that is admittedly quite large. It has from 7-9 tabs depending on the settings and the data. I can't use the multipage load on demand because I need the user to be able to switch between tabs quickly because when they are on this screen they are on the phone with a customer and need to fill in data and/or answer questions quickly.

I use telerik controls for pretty much everything. There are many grids and even a editor control. Note that I've disabled the editor control to see if that is the issue and it isn't.

My issue is that once the page is downloaded it takes 10 seconds or so for all the javascript to finish their initialization. I do have some of my own javascript that leverages ASP.NET ajax to load components but my stuff is pretty small so I don't think it is my stuff. I think the issue is that I have so many controls on the page that all need to initialize themselves that it takes a long time.

I figured I'd post my issue here to see if there may be tips and tricks that I can leverage or, if not. to see if we can start a thread to see what can be done to make large pages load the javascript faster.

One thing that I've noticed is that it is orders of magnitude faster in Firefox. In fact, in Firefox it is really a non issue.
Sebastian
Telerik team
 answered on 13 Oct 2009
1 answer
190 views

Hi Support Team,

I am using RadControls for ASP.Net AJAX (v. 2009.2.826.35).  I have a RadSplitter control that is nested inside of a RadMultiPage control used by a RadTabStrip.  The splitter controls has two panes - a left pane, that has a fixed width in pixels, and a right pane that I want to fill all of the remaining area.  I have tried to set the height and width of the right pane in two ways: 1) by setting both the height and width to 100%, and 2) using the "Free Size" method, where the height and width are not specified in the RadPane and the splitter calculates the pane size based on what space is remaining after allocating space to absolutely-sized or percent-sized panes.

Either method works fine in Firefox (v3.0.14) and Chrome (v3.0.195.25).  However, in both IE6 and IE8, I get a javascript error, and the content in the right pane only occupies a small fraction of the total available space.  If I specify the height and width in pixels in IE, it works fine.

The markup for the first method (specifying by percent) is listed below. (The right panehas an ID="RightPane")

<body style="height:100%;margin:0px;width:100%;" > 
    <form id="Form1" runat="server" style="height:100%;margin:0px" > 
        <asp:ScriptManager ID="ScriptManager1" runat="server"/>  
          
        <div style="height:100%;margin:0px;width:100%;" > 
          
            <telerik:RadTabStrip ID="radTapStripMain" MultiPageID="radMultiPageMain" AutoPostBack="false" Width="100%" runat="server">  
                <Tabs> 
                    <telerik:RadTab Value="tabAdmin" Text="Admin" PageViewID="pvAdmin" Visible="true" runat="server" /> 
                </Tabs> 
            </telerik:RadTabStrip> 
 
            <telerik:RadMultiPage id="radMultiPageMain" runat="server" Height="100%" Width="100%">  
               <telerik:RadPageView  id="pvAdmin" runat="server" Visible="true" Height="100%" Width="100%">  
                    <telerik:radsplitter id="splitterLinksIndex" orientation="Vertical" Width="100%" Height="100%" HeightOffset="30" runat="server" > 
                      <telerik:radpane id="LeftPane" Width="200" MinWidth="100" MaxWidth="500" runat="server">  
                           <href="http://www.telerik.com" target="<%= RightPane.ClientID %>">link</a> 
                      </telerik:radpane> 
                      <telerik:radsplitbar id="RadSplitBar1" collapsemode="Forward" runat="server"/>  
                      <telerik:radpane Scrolling="Y" id="RightPane" Width="100%" Height="100%" ContentUrl="http://www.microsoft.com" runat="server"></telerik:radpane> 
                    </telerik:radsplitter>       
                 </telerik:RadPageView >    
            </telerik:RadMultiPage> 
              
        </div> 
    </form> 
</body> 

If I look at the IFRAME that is generated by the page, it has a specified height and width in Firefox but not in IE:


Firefox:  
<iframe id="RAD_SPLITTER_PANE_EXT_CONTENT_RightPane" frameborder="0" scrolling="auto" name="RightPane" src="http://www.microsoft.com" style="border: 0px none ; height: 825px; width: 1055px;">  
 
IE6:  
<IFRAME id=RAD_SPLITTER_PANE_EXT_CONTENT_RightPane style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" name=RightPane src="http://www.microsoft.com" frameBorder=0></IFRAME> 
 

The javascript error that gets thrown in IE occurs in the line marked with asteriks in the following Telerik javascript function:

 function(g,f)  
 {  
    if(f<=0||f==""){  
        g.style.width="" 
    }     
    else 
    {  
***     g.style.width=f+"px";  
        var h=g.offsetWidth-f;  
        var e=f-h;  
        if(e>0)  
        {  
            g.style.width=e+"px" 
        }  
        else 
        {  
            g.style.width="" 
        }  
    }  
  } 

The error states the the variable "f" is NaN.  I get the same error if I specify the height and width by percent or by the "free size" method.

As an aside, if I remove the splitter from the RadMultiPage and RadTabStrip and put it by itself on the page, the IE javascript error disappears and I can set the width and height by percent with no problems.

Thank you for your assistance.  Please let me know if you need any further information.

Svetlina Anati
Telerik team
 answered on 13 Oct 2009
1 answer
104 views
In your load on demand example, imagine the following: You add a RadComboBox thats dynamically filled with say, flavors of one of the food items. When you choose one of the flavors, you want the control in the tooltip to reload so the picture and data correspond to that particular product flavor.

How do you set the new product # and then refresh the usercontrol inside the tooltip?
Svetlina Anati
Telerik team
 answered on 13 Oct 2009
2 answers
422 views
Hello,
I have a grid with Grouping enabled that is populated programatically, and during the ItemDataBound event, items that do not meet a certain criteria are set to Visible = False.
When the grid is rendered, there may be group headers that do not contain any items, if none of the items satisfied my criteria, so in those cases I need those groups to be hidden or removed. I only want the user to see and expand/collapse group headers that actually contain items within.

How can I do this?
Should I remove the items during ItemDataBound instead of setting them to Visible = False, so that no Group Header is generated? If so, what is the best way to do this?

Thanks in advance.
Jorge
Top achievements
Rank 1
 answered on 13 Oct 2009
1 answer
166 views
Hello,

i have a XMLDocument from Webservice and i will show this in a RadListBox Control. The XML Document:
<?xml version="1.0" encoding="utf-8" ?> 
<controls> 
  <control id="123" name="stream" text="stream1.wma" time="300" /> 
  <control id="9023" name="picture" text="bild1.jpg" time="800" /> 
  <control id="9023" name="picture" text="bild2.jpg" time="800" />     
...  
</controls> 

Can i load this in the RadListBox? Can i show this in two columns? I need the "name"-Tag for an icon (I have different icons for the different "name"-Tags) , the "text"-Tag and the "time"-Tag. Is that possible?

br
Reiner
Paul
Telerik team
 answered on 13 Oct 2009
1 answer
86 views
First this is an issue only in IE (tested bad: IE 6, IE 8, good: FF 3.5.3).
I have js which adds a tab when the user is on one tab that has questions like:
Add Tab HM? [] yes [] no
using a radioButtonList and OnClick="parent.HMRadioChange()"
(Yeah all the tabs each have an iframe that loads the content like what I described for this tab. I know how bad iframes are, so I don't need that lecture, I don't have the option to change that).
Unfortunately there is also a postback: onselectedindexchanged="HMRadio_SelectedIndexChanged" which is why the load method is called after the user selects Yes to add the tab.

Anyway it was working when the tab was names didn't have any underline, and now it throws an error. Since adding the <u> to the tab name is what is causing the exception, I will leave out the code here for adding the tab, examples can be found elsewhere on this site.

Here is the js that is causing the problem:
function EndRequestHandler(sender, args) { 
   parent.refreshHeader(); 
function load() { 
   Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); 

Here is the exception:
A Runtime Error has occurred.
Do you wish to Debug?

Line 6: Error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
Yes   No

Here is what the tabs look like in the parent aspx:
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" 
    OnClientTabSelected="OnClientTabSelected" OnClientTabSelecting="OnClientTabSelecting" 
    UnSelectChildren="True" ClickSelectedTab="True" Skin="Vista" SelectedIndex="0" 
    CausesValidation="false"
    <Tabs> 
        <telerik:RadTab runat="server" Text="<u>Q</u>uestions" PageViewID="TABQUESTION" ToolTip="Questions" /> 
        <telerik:RadTab runat="server" Text="<u>H</u>M" PageViewID="TABHM" ToolTip="HM Information" /> 
    </Tabs> 
</telerik:RadTabStrip> 
<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" Height="3500px" 
    Width="790px"
    <!--QUESTIONS TAB --> 
    <telerik:RadPageView ID="TABQUESTION" Height="100%" runat="server" ToolTip="Questions"
        <iframe id="QUESTIONSIFRAME" name="QUESTIONSIFRAME" width="100%" height="100%" 
            frameborder="0" runat="server"></iframe> 
    </telerik:RadPageView> 
    <!--HM TAB --> 
    <telerik:RadPageView ID="TABHM" Height="100%" runat="server" ToolTip="HM Information"
        <iframe id="HMIFRAME" name="HMIFRAME" width="100%" height="100%" frameborder="0" title="HM Information"
        </iframe> 
    </telerik:RadPageView> 
</telerik:RadMultiPage> 

Is anyone familiar with Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); and could venture a guess why it works with a tab named "HM" but not "<u>H</u>M"?
Paul
Telerik team
 answered on 13 Oct 2009
1 answer
101 views
I think this is related to the post on browser highlighting, but in IE 8 if you select mutliple items using CTRL, the accelerator link is shown. From a user perspective this is pretty confusing - see the attached screenshot.

Any suggestions?
Paul
Telerik team
 answered on 13 Oct 2009
2 answers
118 views
We have a RadRotator that is inside of an iframe and we also have a context menu on the rotator (inside of the iframe). When you right click on the rotator, the menu shows up fine. However, as soon as you manually rotate the rotator to the next panel, the menu starts to appear entirely white. We had this problem with the 2008 controls and we were told to place this CSS change into the page:

.RadMenu_Default_Context iframe  
    { 
        displaynone !important; 
    } 


This worked just fine with those controls, but now for some reason it no longer seems to do the trick with the latest and greatest version. The output of the menu appears to be very much the same as it used to be and I verified that the CSS classes exist with the new version of the controls. 

Thanks,
Adam
Adam
Top achievements
Rank 1
 answered on 13 Oct 2009
5 answers
78 views
Dear telerik,

I got a case where I load multiple usercontrols of the same type with different data.
Any control can trigger a postback in which I only wish to update that specific control.

I see that I can find the initiating control ID in the RadScriptmanager.
This allows me to update only the value I wish to update. That even seems to work very good.

However all controls that were previously ajaxified are no longer ajaxified.
I assume this happens because the AjaxManager gets reinitialized?

But even when I do reset the ajaxmanagers ajax settings it won't work. 
Does it depend on the viewstate or something like that?

and as a final question:
are there any suggestion on how to get this particular behaviour since executing all
code in the codebehind seems rather useless(and most importantly slow compared to doing this with a custom XMLHttpRequest).
It makes the ajaxmanager kinda useless to me if there is no other way.

I really hope you guys can help me with this.

kind regards,
Wim 
Wim van der Linden
Top achievements
Rank 1
 answered on 13 Oct 2009
3 answers
755 views
Hi All,

i am having a problem, i am using a radgrid with a label called "lblID" inside the ItemTemplate of the grid.

Is there a way i can get the labels text using JavaScript??

my code:

function RowDblClick()
{
Code to go here!!
}

my Grid:

<Columns>
                <telerik:GridTemplateColumn HeaderText="ID" UniqueName="ID" Visible="False">
                    <ItemTemplate>
                        <asp:Label ID="lblID" runat="server" Visible="true" Text='<%# Eval("ID") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                 <telerik:GridTemplateColumn HeaderText="Name" UniqueName="Name">
                    <ItemTemplate>
                        <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                    </ItemTemplate>
                     <HeaderStyle Width="50%" />
                     <ItemStyle Width="50%" />
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Date" UniqueName="TemplateColumn21">
                    <ItemTemplate>
                        <asp:Label ID="lblDate" runat="server" Text='<%# Eval("Date") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Edit" UniqueName="TemplateColumn2" Visible="False">
                    <ItemTemplate>
                        <asp:HyperLink ID="hprEdit" runat="server" Target="_blank">Edit</asp:HyperLink>
                    </ItemTemplate>
                    <FooterStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                        Font-Underline="False" Wrap="True" />
                    <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" Wrap="True" />
                </telerik:GridTemplateColumn>
            </Columns>
<ClientSettings EnablePostBackOnRowClick="True" AllowExpandCollapse="False" AllowGroupExpandCollapse="False">
                            <ClientEvents OnRowDblClick="RowDblClick" />
                            <Selecting AllowRowSelect="True"/>
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>

please help!?!?!?!
Shinu
Top achievements
Rank 2
 answered on 13 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?