Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
175 views
Hi,

I have a rating column inside a ragrid, which usually works fine, however I am encountering an error when I add new items to it for the first time.

If items are loaded from the database, then they appear correctly, however if I update the previously empty data source with a new item, the rating column will display hyperlinks for 1,2,3,4,5, rather than the star images that are usually present.  Please see the attached screenshots for more details.

I haven't come across this problem anywhere else on the forum, so any help would be appreciated.
Mathew
Top achievements
Rank 1
 answered on 03 Nov 2011
3 answers
146 views
I use MasterPage .
In master page, I put RadScriptManager and RadAjaxManager in it.
In child page, I put RadAjaxManagerProxy in it. A RadAjaxPanel with several controls in it.
Two buttons controls the RadAjaxPanel's sub-controls visibilty.
When RadEditor set visible=false, then set visible=true, the RadEditor will not work.


Site1.Master
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="TestRadControlMP.Site1" %>
  
<%@ 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">
  
<head runat="server">
    <title></title>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
          
        </asp:ContentPlaceHolder>
    </div>
    </form>
</body>
</html>

Site1.Master.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
namespace TestRadControlMP
{
    public partial class Site1 : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
  
        }
    }
}


WebForm1.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"
    CodeBehind="WebForm1.aspx.cs" Inherits="TestRadControlMP.WebForm1" %>
  
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Button1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="Button2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <br />
    1. Click Button2
    <br />
    2. Click Button1
    <br />
    3. RadEditor、RadComboBox does not work.
    <br />
    <asp:Button ID="Button1" runat="server" Text="Button1" 
        onclick="Button1_Click" />
    <asp:Button ID="Button2" runat="server" Text="Button2" 
        onclick="Button2_Click" />
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px">
        <telerik:RadEditor ID="RadEditor1" runat="server">
        </telerik:RadEditor>
        <telerik:RadTextBox ID="RadTextBox1" runat="server">
        </telerik:RadTextBox>
        <telerik:RadComboBox ID="RadComboBox1" runat="server">
            <Items>
                <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" 
                    Value="RadComboBoxItem1" />
                <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" 
                    Value="RadComboBoxItem2" />
            </Items>
        </telerik:RadComboBox>
    </telerik:RadAjaxPanel>
</asp:Content>

WebForm1.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
namespace TestRadControlMP
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
  
        }
  
        protected void Button1_Click(object sender, EventArgs e)
        {
            RadEditor1.Visible = true;
            RadTextBox1.Visible = true;
            RadComboBox1.Visible = true;
        }
  
        protected void Button2_Click(object sender, EventArgs e)
        {
            RadEditor1.Visible = false;
            RadTextBox1.Visible = false;
            RadComboBox1.Visible = false;
        }
    }
}


Web.Config
<?xml version="1.0"?>
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </assemblies>
    </compilation>
    <httpHandlers>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
    </httpHandlers>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
    </handlers>
  </system.webServer>
</configuration>
Ray
Top achievements
Rank 1
 answered on 03 Nov 2011
2 answers
140 views

Dear  All ,

    Kindly help me regarding the following issue.

Issue :     I toogled a background image to Rad combox  control.
                style class is as follows 
                

.RadComboBox_SP .rcbArrowCell a
{
    position: relative;
    outline: 0;
    overflow: hidden;
    display: block;
    width: 18px;
    height: 16px;
    text-decoration: none;
    text-indent: -9999px;
    font-size: 1px;
    background-image: url('../../myImages/png_search.png');
    background-repeat: no-repeat;   
}

the toogled image is  not getting set properly in IE 7.0  ,

please find the attached screen shot ,  i  placed Radcombobox inside a repeater ,when ever i start click on add new line gets add to the repeater , once the vertical scroll overflows toogled image is comming out . this is happening with IE 7 only (working fine with IE8) . but my requirement is to make it proper in IE 7.

 

Please help me to  solve  this issue .

please go through the attached screen shot.
                  
Thanks in Advance
          

Ivana
Telerik team
 answered on 03 Nov 2011
1 answer
182 views
Greetings,

I have been searching for the solution for a while now but can't understand where it comes from:

The situation is simple, with this code:

<telerik:GridTemplateColumn UniqueName="Debriefing">
    <ItemTemplate>
        <asp:HyperLink runat="server" ID="DebriefingRDV" Text="Rapport"></asp:HyperLink>
    </ItemTemplate>
</telerik:GridTemplateColumn>

"Rapport" appears in my grid but i can't click on it! this is just text!

Thank you for your help!
Adigard
Top achievements
Rank 1
 answered on 03 Nov 2011
2 answers
107 views
I have searched forums but unable to find anything related. In IE editor does not render properly but in chrome/ff it does. 
John
Top achievements
Rank 1
 answered on 03 Nov 2011
1 answer
76 views

 I am going to set content url of panel bar at runtime with Jquery. Something like below


var frameURL = ‘http://msn.com’; //Example

 

var panelBar = $find("<%=this.MiddlePane1.ClientID%>");                      

 
panelBar.set_contentUrl(frameURL);

 

it’s took more time to load complete page on above panel, window look like hang.

 

Instead of that I want to show progress image, until entire page is not render at panel bar.

 

Any suggestion Guys.

Kate
Telerik team
 answered on 03 Nov 2011
1 answer
105 views
Hi,
After selecting an item in my Rad Form Decorated Drop Down List I want it to highlight so you can see the change.  I used the OnClientSelectedIndexChanged event as described here for the Combo Boxes on my page (it works great), but it doesn't work for a Drop Down List.  Any help would be greatly appreciated.  Thanks!
Niko
Telerik team
 answered on 03 Nov 2011
1 answer
116 views

Hi,

 
Radgrid properties like

1.Frozencolumncount
2.ItemStyle-Wrap
3.HeaderStyle-Width
4.Horizontal Scroll
5. Vertical Scroll

do not work as expected in compatibility view. Is there are known solution for this issue?

Thanks,
Maruti

Galin
Telerik team
 answered on 03 Nov 2011
3 answers
107 views
Hey folks, 

When I scroll down a page displayed as rich text in the radeditor using the mouse wheel, or by sliding the editor's scrollbar towards the bottom of the page, phantom line droppings appear over the text that scrolls up from the bottom of the editor's frame.  More precisely, numerous light grey 1pt thick horizontal lines are drawn across the text set at random intervals ranging from a few points to a couple of text lines apart.  As soon as I move the windows mouse pointer to outside of the radeditor's control boundaries, the lines disappear.  I've seen this behavior in other sites that use the telerik radeditor such as the forums in http://devhub.author-it.com/

As a user trying to key text into the control, I find this behavior most annoying because it obliterates the readability of almost everything being displayed, rendering the point of having such an editor available in the first place as being useless.  I have to spend time haphazardly scrolling the text up and down until I can get a clean display in which I can find the location of what I want to edit OR review.

As a developer, I'ld like to find a way to prevent these lines from ever appearing.  What's causing this problem and how can it be fixed?  It doesn't seem to happen when the editor is working with plain text.

I'm using Telerik RAD controls 2011.2.915.35 in visual studio C# build 91605-270-2201135-60151 and am viewing this on Internet Explorer 9  (9.0.8112.16421 with update version 9.0.3) on windows 7 SP1

this is some text
to scroll down on
so you can see the
phenomena happen
here as it seems
this is also a radeditor
telerik control (make
sure you are editing it
in the editor)
Rumen
Telerik team
 answered on 03 Nov 2011
2 answers
424 views
Hello,

I am having this same issue and the solution below was unfortunately not a helpful answer.  I have spent so many hours on this I have lost count. 

When dragging and dropping an appointment, the AppointmentUpdate Server event has the same value for the event args for the e.Appointment AND e.ModifiedAppointment.  When I add the client event OnClientAppointmentMoveEnd, I get the correct modified value on the client side, but the serverside is always wrong.

[.net 2.0 + Q3 2009 with hotfix]

Thanks for the help,

Ryan (Code Below)

Server Code: (values for e.Appointment and e.ModifiedAppointment are the same)
protected void CalendarRadScheduler_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e) 
        { 
            if (e.Appointment.Start != e.ModifiedAppointment.Start) 
            { 
                Appointment objModApt = e.ModifiedAppointment; 
 
                //load message from database 
                MessageDAO daoMessage = new MessageDAO(); 
                MessageDTO dtoMessage = daoMessage.GetById((int)objModApt.ID); 
 
                //update message with new time 
                dtoMessage.Start = objModApt.Start; 
                dtoMessage.End = objModApt.Start.AddMinutes(10); 
 
                //Save updated message to database 
                dtoMessage.Method = CoreToolkit.ObjectMethod.Modify; 
                daoMessage.Save(dtoMessage); 
            } 
            else 
            { 
                e.Cancel = true; 
            } 
        } 

Client Code:
<%@ Control Language="C#" AutoEventWireup="true" Codebehind="MyUserControl.ascx.cs"  
    Inherits="UserControls.MyUserControl" %>  
<meta http-equiv="X-UA-Compatible" content="IE=7"/>  
  
<pro:RadCodeBlock ID="RadCodeBlock1" runat="server">  
  
<script type="text/javascript"> 


 function OnClientAppointmentMoveEnd(sender, eventArgs)
           {
            alert("New start time: " + eventArgs.get_newStartTime());
           }
                        
  
            function formatDate(date)  
            {  
                var year = padNumber(date.getFullYear(), 4);  
                var month = padNumber(date.getMonth() + 1, 2);  
                var day = padNumber(date.getDate(), 2);  
                var hour = padNumber(date.getHours(), 2);  
                var minute = padNumber(date.getMinutes(), 2);  
                  
                return year + month + day + hour + minute;  
            }  
              
            function padNumber(number, totalDigits)  
            {  
                numbernumbernumber = number.toString();  
                var padding = '';  
                if (totalDigits > number.length)  
                {  
                    for (i = 0; i < (totalDigits - number.length); i++)  
                    {  
                        padding += '0';  
                    }  
                }  
                  
                return padding + number.toString();  
            }  
                  
            //prevent resizing  
          function OnClientAppointmentResizeStart(sender, eventArgs)  
          {  
             alert('no resizing');  
             //eventArgs.set_cancel(true);  
          }  
              
            //prevent resizing  
          function OnClientAppointmentResizeEnd(sender, eventArgs)  
          {           
            alert('resizing end')                           
          }  
            
          //prevent editing of recurring messages  
          function OnClientAppointmentEditing(sender, eventArgs)  
          {  
            alert('editing');  
            if(eventArgs.get_editingRecurringSeries())  
                  eventArgs.set_cancel(true);  
          }  
            
          function OnClientAppointmentDoubleClick(sender, eventArgs)  
          {  
              alert('here');  
          }  
            
          function OnClientAppointmentInserting(sender, eventArgs)  
            {  
                 var start = formatDate(eventArgs.get_startTime());  
                   
                 document.location.href = '<%=PageToRedirect + "?StartDate="%>' + start;  
                 eventArgs.set_cancel(true);  
            }    
              
    </script>  
  
</pro:RadCodeBlock>  
<telerik:RadScriptBlock runat="server" ID="scriptContextMenu">  
  
        <script type="text/javascript">  
            var selectedAppointment = null;  
            var contextMenuSlot = null;  
  
            function checkResourceMenuItem(menu, appointment) {  
                var calendar = appointment.get_resources().getResourcesByType("Calendar").getResource(0);  
                if (!calendar)  
                    return;  
  
                var actionItem = menu.findItemByText("Action");  
                //Traverse all menu items below "Action"  
                for (var i = 0; i < actionItem.get_items().get_count(); i++) {  
                    var item = actionItem.get_items().getItem(i);  
                    if (item.get_value() == calendar.get_key()) {  
                        //The item corresponds to the current "Calendar" - the Value of the item stores the Key of the resource  
                        item.set_imageUrl("Images/checked.gif");  
                    }  
                    else {  
                        item.set_imageUrl("");  
                    }  
                }  
            }  
  
            //Called when the user right-clicks an appointment  
            function appointmentContextMenu(sender, eventArgs) {  
                var menu = $find("<%= SchedulerAppointmentContextMenu.ClientID %>");  
                selectedAppointment = eventArgs.get_appointment();  
                checkResourceMenuItem(menu, selectedAppointment);  
                menu.show(eventArgs.get_domEvent());  
            }  
  
            //Called when the user clicks an item from the appointment context menu  
            function appointmentContextMenuItemClicking(sender, eventArgs) {  
                var clickedItem = eventArgs.get_item();                  
                if (clickedItem.get_text() == "Action") {  
                    //Prevent the menu from closing if the user clicked the "Action" menu item  
                    eventArgs.set_cancel(true);  
                    return;  
                }  
            }  
  
            //Called when the user clicks an item from the appointment context menu  
            function appointmentContextMenuItemClicked(sender, eventArgs)   
            {  
                  
                if (!selectedAppointment)  
                    return;  
  
                var clickedItem = eventArgs.get_item();  
                var scheduler = $find("<%= CalendarRadScheduler.ClientID %>");  
  
                if (clickedItem.get_parent().get_text && clickedItem.get_parent().get_text() == "Action") {  
                    //The user clicked the item corresponding to the "Calendar" resource to which the appointment is assigned  
                    if (clickedItem.get_imageUrl())  
                        return;  
  
                    //Clear all resources   
                    selectedAppointment.get_resources().clear();  
                    //Find the resource corresponding to the clicked item  
                    var calendar = scheduler.get_resources().getResourceByTypeAndKey("Calendar", clickedItem.get_value());  
                    //Add it to the appointment resources collection  
                    selectedAppointment.get_resources().add(calendar);  
                    //Update the appointment  
                    scheduler.updateAppointment(selectedAppointment);  
                }  
            }             
              
            function OnClientRecurrenceActionDialogShowing(sender, eventArgs)  
           {  
               alert('in OnClientRecurrenceActionDialogShowing()');  
               eventArgs.set_cancel(true);    
                
               //Edit this instance only:    
               eventArgs.set_editSeries(false);    
           }          
             
           function CalendarRadScheduler_AppointmentContextMenuItemClicked(sender, eventArgs)  
           {  
            alert('you click a menu button');  
           }  
             
           function OnClientNavigationCommand(sender, eventArgs)  
           {  
              alert('Navigation Command:');  
              alert(eventArgs.get_selectedDate().toString());                
           }  
             
        </script>  
  
    </telerik:RadScriptBlock>  
  
  
<pro:RadAjaxManager ID="RadAjaxManager1" EnableAJAX="true" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">  
    <AjaxSettings>  
        <pro:AjaxSetting AjaxControlID="CalendarRadScheduler">  
            <UpdatedControls>  
                <telerik:AjaxUpdatedControl ControlID="CalendarRadScheduler" LoadingPanelID="RadAjaxLoadingPanel1" />  
            </UpdatedControls>  
        </pro:AjaxSetting>  
    </AjaxSettings>  
</pro:RadAjaxManager>  
  
        <pro:RadScheduler   
            ID="CalendarRadScheduler"   
            runat="server"   
            EnableAjaxSkinRendering="false"  
            Height="750px"   
            Width="578px"   
            ShowAllDayRow="False"   
            AllowDelete="True"   
            AllowEdit="True"  
            AllowInsert="True"   
            Skin="Office2007"  
            HoursPanelTimeFormat="h:mm tt"   
            MinutesPerRow="15"   
            ShowFullTime="True"  
            StartEditingInAdvancedForm="false"  
            DataKeyField="ID"   
            DataSubjectField="Subject"   
            DataStartField="Start"   
            DataEndField="End"  
            DataRecurrenceField="RecurrenceRule"   
            DataRecurrenceParentKeyField="RecurrenceParentID"  
            DayEndTime="18:30:00"   
            DayStartTime="08:00:00"   
            ShowFooter="false"   
            OnClientAppointmentInserting="OnClientAppointmentInserting"  
            OnClientAppointmentDoubleClick="OnClientAppointmentDoubleClick"  
            OnClientAppointmentEditing="OnClientAppointmentEditing"   
            OnClientAppointmentResizeEnd="OnClientAppointmentResizeEnd"  
            OnAppointmentCreated="CalendarRadScheduler_AppointmentCreated"   
            OnAppointmentDataBound="CalendarRadScheduler_AppointmentDataBound"   
            CustomAttributeNames="NetworkId"   
            OnAppointmentCommand="CalendarRadScheduler_AppointmentCommand"   
            OnFormCreating="CalendarRadScheduler_FormCreating"   
            OnAppointmentContextMenuItemClicked="CalendarRadScheduler_AppointmentContextMenuItemClicked"   
            OnAppointmentUpdate="CalendarRadScheduler_AppointmentUpdate"  
            OnClientRecurrenceActionDialogShowing ="OnClientRecurrenceActionDialogShowing"   
            OnClientNavigationCommand="OnClientNavigationCommand" 
            OnClientAppointmentMoveEnd="OnClientAppointmentMoveEnd"
            OnNavigationCommand="CalendarRadScheduler_NavigationCommand">  
              
            <AppointmentContextMenus>  
                <%--The appointment context menu interaction is handled on the client in this example--%>  
                <%--See the JavaScript code above--%>  
                <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerAppointmentContextMenu">  
                    <Items>  
                        <telerik:RadMenuItem Text="View" Value="CommandView" />  
                        <telerik:RadMenuItem IsSeparator="True" />  
                        <telerik:RadMenuItem Text="Copy" Value="CommandCopy" ImageUrl="/images/copy.gif"/>  
                        <telerik:RadMenuItem IsSeparator="True" />  
                        <telerik:RadMenuItem Text="Edit" Value="CommandEdit" ImageUrl="/images/edit.gif"/>  
                        <telerik:RadMenuItem IsSeparator="True" />  
                        <telerik:RadMenuItem Text="Delete" Value="CommandDelete" ImageUrl="/images/icon_trash.gif" />  
                        <telerik:RadMenuItem IsSeparator="True" />  
                        <telerik:RadMenuItem Text="Action" Visible="false">  
                            <Items>  
                                <telerik:RadMenuItem Text="Development" Value="1" />  
                                <telerik:RadMenuItem Text="Marketing" Value="2" />  
                                <telerik:RadMenuItem Text="Personal" Value="3" />  
                                <telerik:RadMenuItem Text="Work" Value="4" />  
                            </Items>  
                        </telerik:RadMenuItem>  
                         
                    </Items>  
                </telerik:RadSchedulerContextMenu>  
            </AppointmentContextMenus>  
            <AppointmentTemplate>  
                <div>  
                    <%# FormatCalendarMessage() %>  
                </div>  
            </AppointmentTemplate>  
              
        </pro:RadScheduler>  
      
<asp:Label ID="lbl" runat="server" Visible="false"></asp:Label>  
<pro:RadAjaxLoadingPanel   
    ID="RadAjaxLoadingPanel1"   
    runat="server"   
    Transparency="30"  
    BackColor="#E0E0E0"   
    InitialDelayTime="500">  
        <asp:Image ID="Image2" Style="margin-top: 200px" runat="server" ImageUrl="/images/loading.gif" BorderWidth="0px" AlternateText="Loading"></asp:Image>  
</pro:RadAjaxLoadingPanel>  

Amit
Top achievements
Rank 1
 answered on 03 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?