Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
494 views
Hi

I have a radgrid  and radtimepicker on itemtemplates for each column,

the radtimepicker when loaded gets the time from the database, but when it's loaded, user can modify the time, I need to calculate the total time and display it on the end cell of each row for that row.

What's the best way to calculate this and display it on the radgrid on the client side.

Many thanks!
Princy
Top achievements
Rank 2
 answered on 31 Jan 2014
1 answer
125 views
Is there anyway I can block this event<FormCreated> from postback of User control elements.
Currently I am having issue with it. Please check the image.


1. In the FormCreated event I have
if (e.Container.Mode == SchedulerFormMode.AdvancedInsert)
            {
                AgendaAppointment insertAppointment = (e.Container.FindControl("ucAppointmentInsert") as AgendaAppointment);
                insertAppointment.CurrentUser = SessionManager.LoginUser;
                insertAppointment.ActionDate = radSchAppTimeTodo.SelectedDate;

                if (radSchAppTimeTodo.SelectedView == SchedulerViewType.DayView)
                {
                    insertAppointment.TimeFrom = ((SchedulerAppointmentContainer)(e.Container)).Appointment.Start.TimeOfDay;
                    insertAppointment.TimeTo = ((SchedulerAppointmentContainer)(e.Container)).Appointment.End.TimeOfDay;
                }
                else
                {
                    insertAppointment.TimeFrom = DateTime.Now.TimeOfDay;
                    insertAppointment.TimeTo = DateTime.Now.TimeOfDay;

                }
}

and its working fine for the first them.
2. It sets the TIMEPICKER values of From and To and its difference are calculated and shown in Hours and Minue Integer text field which is correct.
3. But when I increase or decrease the Integer field then postback occurs and those initial values are set again. So If I increase the hours or minute it gets rollback to old values.

So is there anyway to block the form created event on postback.




 
Boyan Dimitrov
Telerik team
 answered on 31 Jan 2014
3 answers
111 views
I have a page that opens a Radwindow as a popup confirm window before deleting an item. Only on IE8, the confirmation doesn't work. It keeps looping - you click confirm, the radwindow shows again, you click confirm again, the radwindow shows again....

On IE debugger, I get the script error "Object doesn't support property or method 'createEvent' ". I am not sure where this is getting fired off. Is there a way to fix this? Please let me know if you need any other information from me. 
Marin Bratanov
Telerik team
 answered on 31 Jan 2014
3 answers
70 views
Here are my initial steps:

1) Create a fresh .NET 4.5 "ASP.NET Web Forms Application" in Visual Studio 2012
2) Upgrade the project to a Telerik RadControld project, using v 2013.3.1015.45
3) Place the following markup on Default.aspx:

<%@ Page Title="Home Page" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.vb" Inherits="RadSpellTestApp._Default" %>
 
<asp:Content runat="server" ID="HeaderContent" ContentPlaceHolderID="HeadContent" >
 
    <script type="text/javascript">
        function spellCheck(elID) {
            var spell = $find(elID);
            spell.startSpellCheck();
            return false;
        }
    </script>
 
</asp:Content>
 
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    
    <asp:Button ID="btnOpen" runat="server" Text="Open Window" />
 
    <trk:RadWindow ID="rdwElement" runat="server" Behaviors="Move,Resize" Width="525" Height="390" Modal="true" VisibleStatusbar="false" >
        <ContentTemplate>
 
            <trk:RadAjaxPanel ID="pnlElement" runat="server">
                             
                <trk:RadTextBox ID="txtText" runat="server" Rows="7" TextMode="MultiLine" Width="474px" />
                <trk:RadSpell ID="rdSpell" runat="server" ButtonType="None" ControlToCheck="txtText" />
                <asp:Image ID="imgSpell" runat="server" ImageUrl="~/Images/spellcheck.gif" Style="cursor: pointer;" ToolTip="Spell check" />
 
            </trk:RadAjaxPanel>
         
            <br />
            <asp:Button ID="btnClose" runat="server" Text="Close Window" />
         
        </ContentTemplate>
    </trk:RadWindow>
 
</asp:Content>

This is the code-behind:

Public Class _Default
    Inherits Page
 
    Private Sub btnOpen_Command(sender As Object, e As CommandEventArgs) Handles btnOpen.Command
        rdwElement.VisibleOnPageLoad = True
    End Sub
 
    Protected Sub btnClose_Command(ByVal sender As Object, ByVal e As CommandEventArgs) Handles btnClose.Command
        rdwElement.VisibleOnPageLoad = False
    End Sub
 
    Protected Overrides Sub OnPreRender(e As EventArgs)
        MyBase.OnPreRender(e)
        imgSpell.Attributes("onClick") = "spellCheck('" & rdSpell.ClientID & "')"
    End Sub
 
End Class


If I open and then immediately close the RadWindow, I don't get any errors. However, if I:

1) Open the Window
2) Spell-check the textbox.
3) Close the Window

I get a javascript error:

0x800a1391 - JavaScript runtime error: '$telerik' is undefined

This same setup did not cause me problems in .NET 4.0. I can send the corresponding .NET 4.5 .zip file if necessary. Thank you!
Marin Bratanov
Telerik team
 answered on 31 Jan 2014
1 answer
83 views
hi . i am using rating in listview. and i give to rating custom cId attribute. but i cant reach it now.
rating
<ItemTemplate>
                   <div class="rlvI">
<telerik:RadRating ID="rCevap" runat="server"
                                   Orientation="Vertical"
                                   SelectionMode="Continuous"
                                   IsDirectionReversed="true"
                                   Precision="Exact"
                                   AutoPostBack="true"
                                   OnRate="rCevap_Rate"
                                   cId='<%# Eval("CId") %>'
                                   ViewStateMode="Disabled"
                                   EnableViewState="false"
                                   Visible='<%# Eval("CId")==null?false:true %>'
                                    >
                               </telerik:RadRating>
                   </div>
               </ItemTemplate>

Eval("CId") is not null it has a value.

rate event

protected void rCevap_Rate(object sender, EventArgs e)
        {
           
            RadRating rc = (sender as RadRating);
          
            int cId = Convert.ToInt32(rc.Attributes["cId"]);
...
}


rc.Attributes["cId"] comes null every time.
What is my mistake here.
Thanks.
Cuneyt
Top achievements
Rank 1
 answered on 31 Jan 2014
1 answer
97 views
Hi,

We are using Telerik version 2012.1.411.40. We have placed a RadEditor in one of our pages and found out that we cannot paste an directly directly onto RadEditor. After reading through some of the Telerik post we figured out that this issue is resolved in the newer version of Telerik dll's but the issue is that we cannot upgrade the telerik dll's at this moment as we are loosing the UI customization that we did.

Is there a way we can fix the issue of pasting images in RadEditor in older version of telerik i.e 2012.1.411.40?

Thanks
Varun
Marin Bratanov
Telerik team
 answered on 31 Jan 2014
6 answers
786 views
I would like to be able to display different text in the combo box visual portion and it's dropdownlist.  Example: I have a combobox with the following items

Supervisor
Superintendent
Project Lead
Project Manager
Program Manager

So when you select the combobox you get the dropdown with those items.  But then when you select Supervisor, instead of displaying Supervisor on the screen it now displays a two digit code such as "21".  When clicking the combo box that displays "21" I'd like it to still show the above list items.

Is this possible?

Boyan Dimitrov
Telerik team
 answered on 31 Jan 2014
7 answers
441 views

Problem adding javascript onclick event to gridbuttoncolumn in code behind when using grid virtualization - when virtualisation = false works Ok i.e. when user clicks on the button an image is displayed in a lightbox - when virualisation = true link does not work - attached is code within itemdatabound event from a test project that I setup - thanks



    Private Sub RadGrid1_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound
 
        If TypeOf e.Item Is GridDataItem Then
 
            Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
 
            Dim imageTitle As String = ""
            Dim imageDescription As String = ""
            Dim imageName As String = "~/Images/Refresh.gif"
 
            Dim ImageButton1 As ImageButton = DirectCast(item("Image1").Controls(0), ImageButton)
             
ImageButton1.Attributes.Add("onclick", "showImage('" & imageTitle & "','" & imageDescription & "','" & imageName & "'); return false;")
 
        End If
 
    End Sub





Antonio Stoilkov
Telerik team
 answered on 31 Jan 2014
4 answers
211 views
Hi,

I'm using RadScheduler with document mode of IE9.
Each appointment is cut, with the height of its containing <td>, and not the height by its duration.

If I change to IE7 document mode, it looks OK.

If I'm on IE9 mode, but removing {position: relative} from the class .rsWrap, the height is OK, but the width is now all over the week, and not over one day.

Screenshots attached for every scenarios.
I'm using version 2013.2.717.40.

Thanks,
Guy.
Magdalena
Telerik team
 answered on 31 Jan 2014
3 answers
64 views
I open another aspx page via jquery ...in load
Location and size of the paging control and columns not arranged . but in postback occurs and the locations are correct.
Venelin
Telerik team
 answered on 31 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?