Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
144 views
I'm adding a jqplot chart to a page that has a RadTabStrip and a RadMultiPage on it. If I put the target <div> for the plot outside of the RadMultiPage, the chart gets rendered. If I put the target <div> inside the RadMultiPage, however, it doesn't get rendered. This makes me think the JavaScript that's attempting to render the chart in the <div> can't find it.

How should I refer to the <div> in my JavaScript?

Here's how my <div> is defined?
<div id="chartdiv" style="height:300px; width:600px; border: none;"></div>

Here's the JavaScript that references the <div> and how it's placed in the RadPageView:
<telerik:RadPageView ID="Achievement" runat="server">
    <div class="responseDiv"><asp:Label ID = "AchievementLabel" runat="server"></asp:Label></div>
 
    <script type="text/javascript">
        (function ($) {
            $(window).load(function () {
                var exceedPoints = [['3rd', 218], ['4th', 223]];
                var plot1 = $.jqplot('chartdiv', [exceedPoints], {
                    seriesDefaults: { pointLabels: { show: true } },
                    series: [{ label: 'Exceed' }],
                    grid: { drawGridlines: false },
                    seriesColors: ['#666699'],
                    title: 'Reading Scores'
                });
            });
        })($telerik.$);
    </script>
</telerik:RadPageView>


Thanks!

Bryan
bdrennen
Top achievements
Rank 1
 answered on 29 May 2012
3 answers
141 views
I have this problem with radchart, when I use intelligentlabels off it really messes up things.

http://img443.imageshack.us/img443/1107/dumbur4.jpg

If I turn intelligentlabels on...I get some of the labels missing, actually almost half of them. Am I doing something wrong?





http://img443.imageshack.us/img443/3733/intelligentan4.jpg

Thanks
Richard
Top achievements
Rank 1
 answered on 29 May 2012
5 answers
211 views
I'm using AdvancedForm as example shown here
i'm not able to see the returning Category (it is a resource) from the AdvancedForm
What am I doing wrong?

Here i post the important parts

main.aspx
<AdvancedEditTemplate>
                 <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit"
                     Subject='<%# Bind("Subject") %>'
                     Description='<%# Bind("Description") %>'
                     Start='<%# Bind("Start") %>'
                     End='<%# Bind("End") %>'
                     RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'                                                         
                     CategoriaID='<%# Bind("IDTimeLineResource") %>'
                      />
             </AdvancedEditTemplate>
 
             <AdvancedInsertTemplate>
                 <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert"
                     Subject='<%# Bind("Subject") %>'
                     Start='<%# Bind("Start") %>'
                     End='<%# Bind("End") %>'
                     Description='<%# Bind("Description") %>'
                     RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'                    
                     CategoriaID='<%# Bind("IDTimeLineResource") %>'
                      />
             </AdvancedInsertTemplate>

main.vb
(e.Appointment.Resources.Count is 0)
Protected Sub RadScheduler1_AppointmentInsert(ByVal sender As Object, ByVal e As Telerik.Web.UI.AppointmentInsertEventArgs) Handles RadScheduler1.AppointmentInsert
 
           LogManager.WriteToDebugLog("c:\log\", "RadScheduler1_AppointmentInsert " & e.Appointment.Resources.Count)
 
           If e.Appointment.Resources.Count > 0 Then
               If e.Appointment.Resources.GetResourceByType("Categoria") IsNot Nothing Then
                   Dim myCategory As Long = Convert.ToInt32(e.Appointment.Resources.GetResourceByType("Categoria").Key)
                   Dim myScheduler As New Adept.CScheduler(myConn)
                   Dim newID As Long = myScheduler.NewAppointment(e.Appointment.Start, e.Appointment.End, e.Appointment.Subject, e.Appointment.Start, e.Appointment.End, e.Appointment.Start, e.Appointment.End, e.Appointment.Description, , , , myCategory)
                    myScheduler = Nothing
               End If
           End If
 
 
   End Sub

AdvancedFormVB.ascx
<asp:Panel runat="server" ID="ResourceControls">
                       <%-- RESOURCE CONTROLS --%>
                       <ul class="rsResourceControls">
                           <li>
                               <!-- Resource controls should follow the convention Res[Resource Name] for ID -->
                               <scheduler:ResourceControl runat="server" ID="ResCategoriaID" Type="Categoria" Label="Categoria:"
                                   Skin='<%# Owner.Skin %>' />
                           </li>
                       </ul>
                   </asp:Panel>

AdvancedFormVB.ascx.vb
<Bindable(BindableSupport.Yes, BindingDirection.TwoWay)> _
        Public Property CategoriaID() As Object
            Get
'IT DOES gET THE RIGHT CATEGORY. IT WORKS!
                'LogManager.WriteToDebugLog("c:\log\", "GET BindableSupport CategoriaID " & ResCategoriaID.Value)
                Return ResCategoriaID.Value
            End Get
 
            Set(ByVal value As Object)
                ResCategoriaID.Value = value
'IT DOES SET THE RIGHT CATEGORY. IT WORKS!
                'LogManager.WriteToDebugLog("c:\log\", "SET BindableSupport CategoriaID " & value)
            End Set
        End Property

ResourceControlVB.ascx.vb
<Bindable(BindableSupport.Yes, BindingDirection.TwoWay)> _
        Public Property Value() As Object
            Get
                If ResourceValue.SelectedValue <> "NULL" Then
                    'LogManager.WriteToDebugLog("c:\log\", "Value " & DeserializeResourceKey(ResourceValue.SelectedValue))
                    Return DeserializeResourceKey(ResourceValue.SelectedValue)
                  'IT WORKS!
                End If
 
                Return ""
            End Get
 
 
            Set(ByVal value As Object)
            End Set
        End Property

Thank you
Jean-Marc
Top achievements
Rank 1
 answered on 29 May 2012
2 answers
98 views
I am using the code from http://demos.telerik.com/aspnet-ajax/grid/examples/programming/savinggridsettingsonperuserbasis/defaultcs.aspx in my code. I have been successful in saving and loading grid settings except for OrderIndex. I can see it save and load in the functioncalls then do a rebind but the column order is not appearing as saved. Here is the weird thing. If I step through it in debug it works fine. if I take out the break points it does not work. It is as if it needed time to load befor it rebinds. Any helpful hints?
Fred
Top achievements
Rank 1
 answered on 29 May 2012
3 answers
110 views
Hi,
  
I have a scenario where i am using Radspell . When i went through the document specified in below link
http://www.telerik.com/help/aspnet-ajax/spell-getting-started.html
i was not able to understand the from step 4. i.e how to get the files specified inside radspell folder inside AppData.


Can u help me out.

Regards,
Akki
 
Rumen
Telerik team
 answered on 29 May 2012
0 answers
88 views
Hello

I am using Telerik2012 radgrid which is associated with a radfilter. My filter has got an "Apply Filter" button. Everything is working fine. My only requirement is that after closing the last existing radfilter expression, the grid is not rebinding to its initial state unless I click on the ApplyFilter button.

Regards
Jiju.
Jiju
Top achievements
Rank 1
 asked on 29 May 2012
2 answers
259 views
Hi!
we have multiple radcontrols on on our pages and the list of .js files requested is accordingly long. As we have a RadScriptManager on every page, I'd expect there to be only ONE combined request - but that's not the case. Our pages still request between 10 - 20 individual scripts on every load (such as RadButton.js). We load many of the controls dynamically - can that be an issue? Am I missing something here? Is any additional configuration required?

This is part of our <handlers> section (running IIS7 in integrated mode):
<add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />

This is our RadSrciptManager:
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableScriptCombine="true">
</telerik:RadScriptManager>

I tried adding scripts individually to the RadScriptManager like so:
<Scripts>
    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Grid.RadGrid.js" />
</Scripts>

which results in this error:

The Assembly "Telerik.Web.UI, Version=2012.1.215.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" does not contain a Webressource with the name "Telerik.Web.UI.Grid.RadGrid.js".



Thanks for any help!
Frankie
Top achievements
Rank 2
 answered on 29 May 2012
3 answers
232 views
I have a RadScheduler Week view with only one time row. In this case the calendar popup will be clipped.

Is there any workaround?
Plamen
Telerik team
 answered on 29 May 2012
6 answers
197 views
Hello Sir,

I have a form with Grid/Item Drag-and-Drop which works on Computer but doesn't work on iPad. Is there any way to make it work? If not, do any of upcoming releases will have Grid/Items Drag-and-Drop support for iPad?


Thank you. 
Roger
Top achievements
Rank 1
 answered on 29 May 2012
2 answers
159 views
I'm using repeater inside a user control, which is dynamically generated by other parent page inside raddock, so the hierarchy is: Page, RadDock, User Control, Repeater.

My problem is that the repeater doesn't fire Item command event,
Here is the code of the repeater inside the user control:

<asp:Repeater ID="rptrFirst5Assignments" runat="server"
    onitemdatabound="rptrFirst5Assignments_ItemDataBound"
    onitemcommand="rptrFirst5Assignments_ItemCommand"
    onitemcreated="rptrFirst5Assignments_ItemCreated" >
    <ItemTemplate>
        <table >
            <tr >
                <td >
                    <asp:Label ID="lblAssignmentID" runat="server" Text='<%# Bind("Asm_ID") %>'
                        Visible="false"></asp:Label>
                    <asp:Label ID="lblCreatedByID" runat="server" Text='<%# Bind("Asm_CreatedBy") %>'
                    Visible="false"></asp:Label>
                    <asp:Label ID="lblAssignment" runat="server" CssClass="alltext" Text='<%# Bind("Asm_Body") %>'></asp:Label>
                </td>
                 <td style="float:left;">
                  
                 <asp:LinkButton ID="btnDelete" runat="server" CausesValidation="false" CssClass="link-delete" CommandName="Delete"
                                CommandArgument='<%# Eval("Asm_ID")%>' /></td>
            </tr>
        </table>
         
    </ItemTemplate>
     
</asp:Repeater>


And this is how i dynamically create the rad docks in the parent page:
as mentioned in the demo of rad dock:
if (!Page.IsPostBack)
            {
CreateDocksFirstTime();
 
 
for (int i = 0; i < RadDockLayout1.Controls.Count; i++)
                {
                    if (RadDockLayout1.Controls[i].GetType() == typeof(RadDock))
                    {
                        RadDock radDock = (RadDock)RadDockLayout1.Controls[i];
                            List<Assignment> assignments = AssignmentBL.SearchTodayAssignments(3,5,0, SelectedDate);
                           ((Controls.TeacherDateView.TeacherDateViewAssignments)radDock.ContentContainer.Controls[0]).FillData(assignments);
                            radDock.Title =  assignments.Count ;         
                    }
                }
}
  
private void CreateDocksFirstTime()
        {
            RadDock dock3 = CreateRadDock();
  
            //adding the dock to the docklayout and then docking it to the zone to avoid ViewState issues on subsequent postback
            RadDockLayout1.Controls.Add(dock3);
            dock3.Dock(RadDockZoneAssignments);
            dock3.Height = new Unit(300, UnitType.Pixel);
  
            CreateSaveStateTrigger(dock3);
  
            //Load the selected widget in the RadDock control
            dock3.Tag = "Controls\\TeacherDateView\\TeacherDateViewAssignments.ascx";
            LoadWidget(dock3);
        }
  
  
  
  
private void LoadWidget(RadDock dock)
        {
            if (string.IsNullOrEmpty(dock.Tag))
            {
                return;
            }
            Control widget = LoadControl(dock.Tag);
            widget.EnableViewState = false;
            dock.ContentContainer.Controls.Add(widget);
        }



And then i re create them from the saved state at Page_Init as mentioned in the RadDock Demo
protected void Page_Init(object sender, EventArgs e)
        {
            //Recreate the docks in order to ensure their proper operation
            for (int i = 0; i < CurrentDockStates.Count; i++)
            {
                RadDock dock = CreateRadDockFromState(CurrentDockStates[i]);
                RadDockLayout1.Controls.Add(dock);
                //We want to save the dock state every time a dock is moved.
                CreateSaveStateTrigger(dock);
                //Load the selected widget
                LoadWidget(dock);
                if (CurrentDockStates[i].Closed == true)
                {
                    dock.Visible = false;
                }
}
}


Note that i have buttons inside the user control and they work correctly, Also repeater_ItemDataBound and ItemCreated event handlers are firing correctly.


Any suggestions??
Faten
Top achievements
Rank 1
 answered on 29 May 2012
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?