Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
89 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
110 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
127 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  
    { 
        display: none !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
85 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
765 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
3 answers
571 views
I am loading user controls dynamically while using tabstrip. On one of the tab user control I have save button.

<

 

asp:Button ID="btnSave" runat="server" Text="Save" OnClientClick="return validate();" onclick="btnSave_Click" />
the javascript function is written in external .js file.

In one scenario, if the javscript validations pass, I want the server side click event to execute and open radwindow on server side using the below code. But the server side event is not executing. if I take out onClientClick event then only server side event is firing. Also the  radalert doesnt pop out.

 

string

 

openWindow = "<script language='javascript'>function f(){var navUrl = 'http://www.telerik.com';var oWindow = radopen(navUrl);oWindow.set_width(300);oWindow.set_height(300);oWindow.center();Sys.Application.remove_load(f);};Sys.Application.add_load(f);</script>";

 

Page.ClientScript.RegisterStartupScript(

this.GetType(), "radalert", openWindow);

here is the validate function in javascript file:

function validate()

 

if

 

(!rdChecked) {

 

    radalert('Validation failed

', 300, 100, '');

 

 

return false;

 

}

else {

 

 

 

return true;

 

}

 


any ideas?

cognos s
Top achievements
Rank 1
 answered on 13 Oct 2009
7 answers
155 views
Hi Telerik supporter,

Even though, i saw Rayan has asked about unable selecting a range of items in ListBox control by Shift+click in previously. It's same issue with me in the latest Telerik controls release. Would you pls. help to give a tip to work around or confirm that is still in To-do list of Telerik development team?

The orginal post of Rayan is at http://www.telerik.com/community/forums/aspnet-ajax/listbox/multiple-item-selection-quot-shift-quot-key.aspx

Many thanks,
Triet Pham.
Paul
Telerik team
 answered on 13 Oct 2009
2 answers
80 views
Hello,

I've a problem by diasable ContextMenu in a dynamic generated RadWindow.
Here is my Code:

function OnClientFileOpen(sender, args)  
            {  
               var item = args.get_item();  
               if (item && !item.isDirectory())  
               {  
                    var image = new Image();  
                    image.src = item.get_url();                      
                    var oWnd = $find("<%= RadWindow1.ClientID %>");  
                    oWnd.setUrl(item.get_url());  
                    oWnd.set_width(image.width + 37);  
                    oWnd.set_height(image.height + 70);  
                    oWnd.show();  
                    image.onContextMenu = 'return(false)';  
               }  
            }  

<telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" 
                Height="487px" Width="450px" EnableOpenFile="false" OnClientFileOpen="OnClientFileOpen" 
                OnClientItemSelected="OnClientItemSelected" Skin="Black"   
                EnableCreateNewFolder="False" EnableTheming="False" EnableViewState="False"   
                VisibleControls="TreeView, Grid, Toolbar">  
            <Configuration SearchPatterns="*.jpg"></Configuration> 
            </telerik:RadFileExplorer> 
            <telerik:RadWindow ID="RadWindow1"  runat="server" Skin="Black" Behavior="Close" VisibleStatusbar="false" > 
            </telerik:RadWindow> 

 


At the Image in the RadWindow I want to disable Contextmenu.

Any Ideas?

Thanks,
Best Regards

 

 

 

 

 

 

 

 

 

Fiko
Telerik team
 answered on 13 Oct 2009
1 answer
278 views
Please find the the requirements I am working on:

  1. On click of header column text, sorting should nothappen.
  2. Header should display default sort icon - Up and Down arrows.
  3. On click on up arrow and down arrow icons column should be sorted in ascesding and descending order respectively.

 

Challanges - 
  
  1. How to disable sorting command triggering on column header click? It's rendered as a link button I believe. Not sure where exactly it's hooking the click event.
  2. Default sort icon is a single image containing both up and down arrows - How we can segregate the sort behavior on up and down arrows?

    Would appreciate any inputs.

    Thanks,
    Aneesh
Pavlina
Telerik team
 answered on 13 Oct 2009
1 answer
130 views
First off, this doesn't affect FF.  So far, it only affects IE 8.  I'm not sure why this is happening, but I wanted you to be aware.

SCENARIO:
I have a RadGrid with a PopUp edit form and a RadWindowManager on the page.  The PopUp edit form has an anchor that, when clicked, executes a Javascript that opens the RadWindow. Currently the Javascript is in an external file, however, I've tried it in the external source file and in the .net form <head /> as well.  Both deliver the same results.

ISSUE:
It works great the first time the anchor is clicked, however, after the RadWindow is closed, every time I click the link (whether its on the currently edited item or another), IE throws the Javascript error "The object does not support this property or method" on the line:

Sys.WebForms.PageRequestManager._initialize('ctl00$ScriptManager1', document.getElementById('aspnetForm')); 

I tried both ways in opening the window:

function manageCategories() {  
    var oWnd = window.radopen("./ManageCategories.aspx", "manageCategories");  
} 

And the incorrect way (removing the RadWindowManager and opening the window directly)

function manageCategories() {  
    var oWnd = $find(PageControls.manageCategories.id);  
    oWnd.setUrl("./ManageCategories.aspx");  
    oWnd.show();      
} 

Both throw the same error.  I've even put in a temporary "alert('hello');" command inside the function and, again, its displayed once, but every time afterwards, I get the exception.  I have to reload the page in order to "find" the manageCategories function again.

Before I give you the fix, here's additional sample code snippets:

PopUp Form Template (notice the Javascript call at the end of line 9):
                    <FormTemplate>  
                        <table cellspacing="10" style="margin-left:10px;">  
                            <tr>  
                                <td valign="top" align="right" style="width:100px;">Note: </td>  
                                <td colspan="2"><asp:TextBox ID="tbNote" runat="server" TextMode="MultiLine" Rows="6" Columns="50" Text='<%# Bind("note") %>'></asp:TextBox></td>  
                            </tr>  
                            <tr>  
                                <td valign="top" align="right" style="width:100px;">Category: </td>  
                                <td><asp:DropDownList ID="ddlCategory" runat="server" SelectedValue='<%# Bind("categoryID") %>' AppendDataBoundItems="true" DataTextField="category" DataValueField="categoryID" DataSourceID="sqlCategories" ><asp:ListItem></asp:ListItem></asp:DropDownList>&nbsp;&nbsp;&nbsp;[<a onclick="javascript:manageCategories();">Manage Categories</a>]</td>  
                                <td align="right"><asp:Button ID="btnUpdate" runat="server" Text='<%# (Container is GridEditFormInsertItem) ? "Add" : "Update" %>' Width="65" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' /><asp:Button ID="btnCancel" runat="server" Text="Cancel" Width="65" CausesValidation="false" CommandName="Cancel" /></td>  
                            </tr>  
                        </table>  
                    </FormTemplate> 

RadWindowManager:
    <telerik:RadWindowManager id="radWindowManager" runat="server">  
    <windows>  
        <telerik:RadWindow id="manageCategories" Behaviors="Close" EnableEmbeddedSkins="false" Skin="Elevate" ReloadOnShow="true" 
            Left="250px" Modal="true" Runat="server" Width="275px" Height="300px" Title="Manage Categories" ClientCallBackFunction="categoriesCallback" VisibleStatusBar="false" IconUrl="/favicon.ico" >  
        </telerik:RadWindow>  
    </windows>  
</telerik:RadWindowManager> 


FIX:
Again, the issue is, as far as I can tell, only in IE.  The only way I could fix it was to change the code:

From:
[<a onclick="javascript:manageCategories();">Manage Categories</a>] 

To:
[<a onclick="javascript:window.radopen('./ManageCategories.aspx', 'manageCategories');">Manage Categories</a>] 


So, instead of calling another Javascript function, I'm calling the radopen method directly.  This works in both FF and IE.

It seems that somehow IE is losing the manageCategories function after the radWindow has been opened and closed once.

Don't know, but hopefully this solution may help others and again, pinpoint a small bug?

Thanks guys.
Joshua
Georgi Tunev
Telerik team
 answered on 13 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?