Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
111 views
Hi
   I have encountered a strange issue which took me hours to identify. If I add the ajax Manager script on top of the page then it works fine but if I add that at the bottom of the page the it has different behaviour. try this sample

<%

@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

 

<%

@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

 

<!

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

 

html xmlns="http://www.w3.org/1999/xhtml">

 

<

 

head runat="server">

 

 

<title>Tab Application</title>

 

 

<style type="text/css">

 

 

.pageView

 

{

 

border: 1px solid #898c95;

 

 

border-top: none;

 

 

margin-top: -1px;

 

 

Height:500px !important;

 

 

width:450px;

 

}

 

.exampleWrapper

 

{

 

padding: 10px;

 

 

background: #f0f0f0;

 

 

float: left;

 

}

 

 

 

</style>

 

</

 

head>

 

<

 

body>

 

 

<form id="form1" runat="server">

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableTheming="True">

 

 

</telerik:RadScriptManager>

 

 

<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="false" Skin="Web20">

 

 

</telerik:RadSkinManager>

 

 

 

 

 

<div>

 

 

<div class="exampleWrapper">

 

 

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Web20" AutoPostBack="true" Width="450px"

 

 

MultiPageID="mpvMain" SelectedIndex="0" OnClientTabSelecting="onTabSelecting" OnClientTabSelected="onClientTabSelected" OnTabClick="RadTabStrip1_TabClick">

 

 

<Tabs>

 

 

<telerik:RadTab runat="server" Text="Contacts" PageViewID="mpContacts" Selected="true" Value="CONTACTS">

 

 

</telerik:RadTab>

 

 

<telerik:RadTab runat="server" Text="Details" PageViewID="mpDetails">

 

 

</telerik:RadTab>

 

 

<telerik:RadTab runat="server" Text="Group Processing" PageViewID="mpGroupProcessing">

 

 

</telerik:RadTab>

 

 

<telerik:RadTab runat="server" Text="Groups" PageViewID="mpGroups">

 

 

</telerik:RadTab>

 

 

</Tabs>

 

 

</telerik:RadTabStrip>

 

 

 

<telerik:RadMultiPage ID="mpvMain" runat="server" SelectedIndex="0" RenderSelectedPageOnly="true" >

 

 

<telerik:RadPageView runat="server" ID="mpContacts" CssClass="pageView" >

 

 

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="225px" HorizontalAlign="NotSet" EnableAJAX="true" LoadingPanelID="RadAjaxLoadingPanel1" >

 

 

<asp:Button runat="server" ID="btnClickMe" Text="Click Me" onclick="btnClickMe_Click" />

 

 

<asp:Label runat="server" ID="lblInBoundary" Text="This is contacts Tab in Boundary"></asp:Label>

 

 

</telerik:RadAjaxPanel>

 

 

<asp:Label runat="server" ID="lblOutOfBoundary" Text="This is contacts Tab out of Boundary"></asp:Label>

 

 

</telerik:RadPageView>

 

 

<telerik:RadPageView runat="server" ID="mpDetails" CssClass="pageView" >

 

 

<asp:Label runat="server" ID="lblDetails" Text="This is Detail Tab"></asp:Label>

 

 

</telerik:RadPageView>

 

 

<telerik:RadPageView runat="server" ID="mpGroupProcessing" CssClass="pageView" >

 

 

<asp:Label runat="server" ID="lblGroupProcessing" Text="This is Group Processing"></asp:Label>

 

 

<asp:TextBox runat="server" ID="txtGroupProcessing"></asp:TextBox>

 

 

<asp:TextBox runat="server" ID="TextBox1"></asp:TextBox>

 

 

</telerik:RadPageView>

 

 

<telerik:RadPageView runat="server" ID="mpGroups" CssClass="pageView">

 

 

<asp:Label runat="server" ID="lblGroups" Text="This is groups"></asp:Label>

 

 

 

</telerik:RadPageView>

 

 

</telerik:RadMultiPage>

 

 

</div>

 

 

</div>

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>

 

 

 

 


 

<telerik:RadAjaxManager runat="server" ID="radAjaxManager">

 

 

 

 

 

<AjaxSettings>

 

 

 

 

 

<telerik:AjaxSetting AjaxControlID="RadTabStrip1">

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="mpvMain"

 

 

LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />

 

 

 

 

 

</UpdatedControls>

 

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

 

 

</AjaxSettings>

 

 

 

 

 

</telerik:RadAjaxManager>

 

 

 

</

 

form>

 

 

 

<script type="text/javascript">

 

 

function onClientTabSelected(sender, args) {

 

}

 

function onTabSelecting(sender, args) {

 

 

 

 

}

 

</script>

 

</

 

body>

 

</

 

html>

on Server Side

 

protected

 

void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)

 

{

System.Threading.

Thread.Sleep(2000);

 

}

 

protected void btnClickMe_Click(object sender, EventArgs e)

 

{

System.Threading.

Thread.Sleep(2000);

 

 

lblInBoundary.Text =

DateTime.Now.ToString();

 

lblOutOfBoundary.Text =

DateTime.Now.ToString();

 

}


Now application has two different ajax callings ,
1) Through Ajax Manager when you change tab pages
2) Through AjaxPanel when you click button. 
 On First tab , I have ajaxPanel which contains 1 label within boundary along with button, So Click of button should only update the label within boundary and other label change from server side should not be reflected on client side. If you click the button then it will update only one label which is within boundary. Now click again and it will update both where it should only update first one.

To resolve the issue move this code from bottom to top just below SkinManager

<telerik:RadAjaxManager runat="server" ID="radAjaxManager">

 

 

 

 

 

<AjaxSettings>

 

 

 

 

 

<telerik:AjaxSetting AjaxControlID="RadTabStrip1">

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="mpvMain"

 

 

LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />

 

 

 

 

 

</UpdatedControls>

 

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

 

 

</AjaxSettings>

 

 

 

 

 

</telerik:RadAjaxManager>

 


and now try again and it will work fine, I can work by placing the ajaxManager on Top but I was wondering what is the reason behind this ?

If you fail to recreate the issue then please let me know , I shall send you this sample project.

Regards
Rizwan Bashir

 

 

Iana Tsolova
Telerik team
 answered on 24 Sep 2009
3 answers
187 views
I have a radscheduler with OverflowBehavior="scroll". If i make the rowheight smaller, say 10px, it causes the appointments to be off. For example, an appointment that should end at 10am now ends at 6:30am. If I remove the rowheight then it looks normal. Is there a way to fix this? I am using firefox.

<script type="text/javascript"> 
            /* Firefox resize scrollable content */ 
            function hideScrollableArea(sender, eventArgs) { 
                if ($telerik.isFirefox) 
                    $telerik.$('.rsContentScrollArea').css('overflow', 'hidden'); 
            } 
            function showScrollableArea(sender, eventArgs) { 
                if ($telerik.isFirefox) 
                    $telerik.$('.rsContentScrollArea').css('overflow', 'auto'); 
            } 
        </script> 
 
<telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Vista" EnableEmbeddedSkins="True" 
                    MultiDayView-UserSelectable="true" TimelineView-UserSelectable="false" ShowNavigationPane="false" 
                    SelectedView="MultiDayView" ShowFooter="false" TimeZoneOffset="-05:00:00" DayStartTime="00:00:00" 
                    DayEndTime="23:59:00" OverflowBehavior="Scroll" Height="551px" DataSourceID="dsRadScheduler1" 
                    MonthView-VisibleAppointmentsPerDay="4" DataKeyField="Conf_ID" DataSubjectField="ConferenceName" 
                    DataStartField="StartTime" OnAppointmentDataBound="RadScheduler1_OnAppointmentDataBound" 
                    DataEndField="EndTime" AllowDelete="false" AllowEdit="false" AllowInsert="true" 
                    OnClientAppointmentDoubleClick="RadScheduler1_OnClientAppointmentDoubleClick" RowHeight="10px" 
                    OnClientTimeSlotContextMenu="timeSlotContextMenu" OnClientAppointmentInserting="RadScheduler1_OnClientAppointmentInserting"> 
                </telerik:RadScheduler> 
                <asp:LinqDataSource runat="server" ID="dsRadScheduler1" OnSelecting="dsRadScheduler1_OnSelecting"> 
                </asp:LinqDataSource> 

Peter
Telerik team
 answered on 24 Sep 2009
2 answers
168 views
I add the RadManager dynamically (server side) OnInit and register a client Id for the RadWindowManager. The code executes without any problem. When i try to open a RadWindow with javascipt (window.radopen) a null reference error occures. The script cannot find the RadWindowManager on the page. Can anyone help me solve this problem?
Dick
Top achievements
Rank 1
 answered on 24 Sep 2009
1 answer
40 views
Hi,

    I have a client who is experiencing a problem with the link manager in IE7 after upgrading to the latest release.  We upgraded from  Q3 2008 SP2 (version 2008.3.1314) .  After the upgrad using IE7 and the link manager dialog we experienced the following issue.  Editing the text of a link using the link manager fails to change the text.  This works fine in FF and IE8 but not in IE7.

    I also had a question about the scroll bar that appears at the bottom of the Image and Template Managers below the window that lists images and templates (file dialog).  What is the funtionality of this scroll bar?  The End-User documentation for the RadEditor doesn't show the scroll bar.

Thanks!

Dave
Rumen
Telerik team
 answered on 24 Sep 2009
2 answers
188 views
Hello,

On row click, I was going to programmatically select a row by attaching to the client-side RowClick, and doing:

sender.get_masterTableView().get_dataItems()[e.get_itemIndexHierarchical()].set_selected(true);

Since I can  get to the item index via the event, and select it with set_selected.  But this throws an exception, on the line of:

this._owner._owner._selection._selectRowInternal

But _selection is null, why is that?

Thanks.
Brian Mains
Top achievements
Rank 1
 answered on 24 Sep 2009
3 answers
114 views
I have a radgrid like below with a column that adds a document to a shopping Cart by clicking a hyperlink.  When the document is added the link is hidden so that the document cannot be added again.  When the document is removed from the cart, I want to find the row in the radgrid based on the documentId  and show the link again. I found how to get row here now I need to hide hyperlink in column. I want to be able to do this client-side.

<telerik:RadGrid ID="rgResults" runat="server">  
                    <MasterTableView DataKeyNames="DocumentId" ClientDataKeyNames="DocumentId" DataSourceID="linqSource" 
                        AutoGenerateColumns="false">  
                        <Columns> 
                            <telerik:GridBoundColumn DataField="CaseNumber" HeaderText="Case Number" UniqueName="CaseNumber" /> 
                            <telerik:GridBoundColumn DataField="ParcelId" HeaderText="Parcel Id" UniqueName="ParcelId" /> 
                            <telerik:GridBoundColumn DataField="PartyName" HeaderText="Party Name" UniqueName="PartyName" /> 
                            <telerik:GridTemplateColumn UniqueName="AddDocument" HeaderText="Add">  
                                <ItemTemplate> 
                                    <asp:HyperLink ID="lnkAddDoc" runat="server" NavigateUrl='<%#"DocumentCart.aspx?docId=" & Eval("DocumentId") %>'>  
                                        <asp:Image ID="lnkImgAddDoc" runat="server" ImageUrl="~/images/doc.gif" AlternateText="Add to My Documents" /></asp:HyperLink> 
                                </ItemTemplate> 
                                <ItemStyle Width="25px" /> 
                            </telerik:GridTemplateColumn> 
                        </Columns> 
                    </MasterTableView> 
                </telerik:RadGrid> 

 
Joe Terhune
Top achievements
Rank 2
 answered on 24 Sep 2009
1 answer
146 views
Hi,

I have a RadGrid with a detailtable.
Given a certain condition i would like to expand an item dynamically usiong the following code
protected void customerRadGrid_ItemDataBound(object sender, GridItemEventArgs e)  
{             
  if (e.Item is GridDataItem)  
  {  
    if (MyExpandCondition((e.Item as GridDataItem)))  
    {  
      item.Expanded = true;  
    }  
  }               
} 

Just setting the Expanded property to true doesn't seem to work. I debugged it and CanExpand is still false (because the ChildItem is still null) at this time.
The HierarchyLoadMode is set to the default one (ServerOnDemand)

I found out that when the user clicks the expand button a firecommand method is called with "ExpandCollapse" and the

ItemIndexHierarchical

 as parameters.
So i changed the "item.Expanded = true" line into "item.FireCommandEvent(RadGrid.ExpandCollapseCommandName, item.ItemIndexHierarchical)" but that doesn't seem to do what i expected.

Does anybody know how to expand this server-side? Or is there a Telerik demo that shows how to do this?

Thanks in advance!

 

Princy
Top achievements
Rank 2
 answered on 24 Sep 2009
2 answers
100 views
Here is exactly what I do :

  1. I open Visual Studio 2005
  2. Create a new Web Site
  3. In default.aspx, I add a new RadEditor Control
  4. In the Smart Tag, I
    • Enable RadEditor Dialogs
    • Enable Spell Check for RadEditor
    • Add RadScriptManager
  5. I compile the project
  6. I open the project (http://localhost/projectname/default.aspx) in my web browser.
  7. The Editor shows and all basic features work fine.  But when I open any dialog (Link manager, Image Manager,  etc), the dialog shows but not completely and I get Javascript errors like this :

 

Error: Sys is not defined  
Source file: http://localhost/project/Telerik.Web.UI.DialogHandler.aspx?DialogName=LinkManager&Skin=Default&Title=Hyperlink%20Manager&doid=1b370f61-93b1-4412-8280-42ccbd3a6b55&dpptn=&dp=BgtyGRNbERUlL1IBIgV6KyN%2FC3NpPxZKOWIPU1UTA0gCbjpUOCpLaHgrXzkuAj5LGBoVCC5hPE4jPyUdImF%2BKCMaDENiCh5VD2MIFXoXLVM1Uz4ICgVpYXEoUwUWPA9YNhsRNyhhIxUtPzEEIhRmMhh%2FbEp8IgJODhkTCnsQGEE1YSYJBj1HensrXy8XPCVDGDcVARNhEQ8tSDEEIj9ENRhwC0BSVWxTPhYxDlUTbFw1YQBPBjwGR0MrcjAmPA9CN24SAgd1ES4lSTkSLz5ACxpvHwV%2BMTBHOmExV2E4A0AHfyZgCQdxRHMGS3YgFj1iNxorKS9%2BMxg6PVZaIT8dExx%2FEElVLyhrDWI1EW45ZAI3RQBgEj5bTmwQfXYhOi1CNRsNOQVhXDQmSCk%2BLz5MdBtvF0RSLxJrDhYPFWADPgM1RSJsOFtXeEMqfXYtKwNCMDENAAd%2BBTclPSZZLBVYCh19YHVjMxJrDToxVWMRG3Exbj5gOS1xRHY5VzAhFyoANhsVKB9YBSMhSwcSKwdyAzR%2BNURVLxp8IRkPFW0CD2EHRClBCgdlfnc5cXYgBy1QNRo3JBNMOzchPggQLwUZBhxEKXVlM2gRPgk1Vm0MH0c6fhR9PT51XENOQzkhFg8BNR8%2FNhNhEQMtKxQfNBZcDRsaF1hSIDQQNQkPFlVmYGM6cT5XECxpR0M0aS84FQhC  
Line: 50  
 
Code: Sys.WebForms.PageRequestManager._initialize('ScriptManager1', document.getElementById('Form1')); 

Error: Type is not defined  
Source file: http://localhost/project/Telerik.Web.UI.DialogHandler.aspx?DialogName=LinkManager&Skin=Default&Title=Hyperlink%20Manager&doid=1b370f61-93b1-4412-8280-42ccbd3a6b55&dpptn=&dp=BgtyGRNbERUlL1IBIgV6KyN%2FC3NpPxZKOWIPU1UTA0gCbjpUOCpLaHgrXzkuAj5LGBoVCC5hPE4jPyUdImF%2BKCMaDENiCh5VD2MIFXoXLVM1Uz4ICgVpYXEoUwUWPA9YNhsRNyhhIxUtPzEEIhRmMhh%2FbEp8IgJODhkTCnsQGEE1YSYJBj1HensrXy8XPCVDGDcVARNhEQ8tSDEEIj9ENRhwC0BSVWxTPhYxDlUTbFw1YQBPBjwGR0MrcjAmPA9CN24SAgd1ES4lSTkSLz5ACxpvHwV%2BMTBHOmExV2E4A0AHfyZgCQdxRHMGS3YgFj1iNxorKS9%2BMxg6PVZaIT8dExx%2FEElVLyhrDWI1EW45ZAI3RQBgEj5bTmwQfXYhOi1CNRsNOQVhXDQmSCk%2BLz5MdBtvF0RSLxJrDhYPFWADPgM1RSJsOFtXeEMqfXYtKwNCMDENAAd%2BBTclPSZZLBVYCh19YHVjMxJrDToxVWMRG3Exbj5gOS1xRHY5VzAhFyoANhsVKB9YBSMhSwcSKwdyAzR%2BNURVLxp8IRkPFW0CD2EHRClBCgdlfnc5cXYgBy1QNRo3JBNMOzchPggQLwUZBhxEKXVlM2gRPgk1Vm0MH0c6fhR9PT51XENOQzkhFg8BNR8%2FNhNhEQMtKxQfNBZcDRsaF1hSIDQQNQkPFlVmYGM6cT5XECxpR0M0aS84FQhC  
Line: 104  
 
Code: Type.registerNamespace("Telerik.Web.UI.Widgets"); 

and a few more like that...  So I can't make it work properly and use all features.  Am I missing something ?  Am I doing something wrong ?
Alexis Gagnon
Top achievements
Rank 1
 answered on 24 Sep 2009
2 answers
131 views
I am trying to ajaxify links in a gridview. When I add the OnItemCreated event hander, I get the error:

Collection was modified; enumeration operation may not execute.


I have predefined AjaxSettings in the RadAjaxManager. I found that if I remove them, I don't get the error. Shouldn't it be possible to have defined ajax settings as well as dynamically added them in code behind?

protected void uxGrid_OnItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridDataItem) 
        { 
            GridDataItem item = (GridDataItem)e.Item; 
            LinkButton lnkAddParticipant = (LinkButton)item["TemplateColumn"].FindControl("lnkAddParticipant"); 
            RadAjaxManager1.AjaxSettings.AddAjaxSetting(lnkAddParticipant, uxGrid, null); 
        } 
    } 

This works:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> 
        <AjaxSettings> 
</AjaxSettings> 
    </telerik:RadAjaxManager> 

This doesn't work:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="btnLoadRooms"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="uxGrid" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
</AjaxSettings> 
    </telerik:RadAjaxManager> 



Ron Cirka
Top achievements
Rank 1
 answered on 24 Sep 2009
2 answers
275 views
Hi,

I am trying to use 'RadListBox' and getting the error : Unknown server tag 'telerik:RadListBox'.

In my code(given below), i have 'telerik:RadScriptManager ' , 'telerik:RadTextBox' and 'telerik:RadListBox '.

If i remove the 'telerik:RadListBox ' then the other two ('telerik:RadScriptManager ' and 'telerik:RadTextBox') works fine and RadTextBox is displayed on the screen.

If i add 'telerik:RadListBox ' to the same page then page give me above error. 


Thanks
Pal



My code:-
------------------------------------------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="temp.aspx.cs" Inherits="Aif.Gatas.temp" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<html><head>
</head>
<body>
<form runat="server" id="mainForm" method="post" style="width: 100%">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadTextBox ID="rTextBox" runat="server" ></telerik:RadTextBox>
        <telerik:RadListBox runat="server" ID="RadListBox1" AllowReorder="true" AllowDelete="true"
            Height="200px" Width="240px">
            <Items>
                <telerik:RadListBoxItem Text="Test Item 1" />
                <telerik:RadListBoxItem Text="Test Item 2" />
            </Items>
        </telerik:RadListBox>
</form>
</body></html>
------------------------------------------------------------------
Tapinder
Top achievements
Rank 1
 answered on 24 Sep 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?