This is a migrated thread and some comments may be shown as answers.

[Solved] Rad Calendar Days are disbaled on load

2 Answers 138 Views
Grid
This is a migrated thread and some comments may be shown as answers.
soumi
Top achievements
Rank 1
soumi asked on 14 May 2008, 12:52 AM

Hi,
 
 The scenario is I have a Rad Calendar inside a Rad Grid. The first time I fired the page on my local, I had the RadCalendar undefined javascript error, but when I refreshed it it never ever came back again. Same thing I deployed on our test server and I get this error every time I load the page first time. Only first time,  not after that. This has also caused my Rad Grid to throw the same error of RadGridNamespace is undefined, while I have Rad Grids in almost 10 other pages where I am not getting this error. I have tried the following ways found on Telerik forums:

  1) Set the UseEmbeddedScripts="false" so that the scripts from the Rad Controls folder at the root of the application will be used instead of loading from the browser (which actually does not make sense here because the control works fine after the first time that means it is able to access the WebResource.axd files).

2) Checked if “Check that file exists” checkbox in the IIS for .axd type files for this application is unchecked. It is unchecked.

3) Cleared the cache to make sure it’s not because of Cache.

4) I have also specifically provided the skin name in the RadCalendar along with UseEmbeddedScripts=”false” condition.

5) The version of the DLL’s in the bin and the scripts in the RadControl folder are the same.

I am using the Q12007 SP2 version of the Telerik Rad Controls. Is there something I am missing?

So in short the Rad Calendar and the Rad Grid (on this specific page only) are not picking up the webresources the first time the page is loaded, after that they are fine. And even if I have forced it to use the scripts from the RadControls folder, by setting the UseEmbeddedScripts=”false” its not making any difference.

This has been eating a lot of my time. Please do advice as to what else can be done.

Thank You,

Soumya

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 May 2008, 07:58 AM
Hi,

Are you binding the Grid using AdvanceDataBinding technique?
Advanced data-binding

Shinu.
0
soumi
Top achievements
Rank 1
answered on 15 May 2008, 04:15 PM
Hi Shinu,

  If you mean that if I am using the NeedDataSource Event, then no I am not. I am using a ObjectDatasource which uses the SQL queries to get me data. 
 
  However the there is Radiobutton list along with the RadCalendar in the Edittemplate of the Rad grid which is being populated  by a Dictionary and databound programatically.

  I am providing my ascx page where the radgrid with the calendar and radiobuttonlist can be seen in the edit template.

<

radG:RadGrid ID="ClosedOutPeriod_RadGrid" runat="server" UseEmbeddedScripts="false" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"

AllowAutomaticUpdates="True" Title="Set Enhanced DNA Profile" AutoGenerateColumns="False" DataSourceID="ClosedOutPeriod_ODS"

Skin="Outlook" GridLines="Vertical" OnPreRender="ClosedOutPeriod_OnPrerender" OnItemCommand="ClosedOutPeriod_OnItmCmd"

OnItemCreated="ClosedOutPeriod_OnItmCrtd" OnItemDataBound="ClosedOutPeriod_OnDataBnd"

OnItemInserted="ClosedOutPeriod_OnInstd" OnItemUpdated="ClosedOutPeriod_OnUptd">

<MasterTableView NoMasterRecordsText="Sorry, no profiles found"

CommandItemDisplay="Bottom" DataSourceID="ClosedOutPeriod_ODS" DataKeyNames="Parent_Id">

<CommandItemSettings AddNewRecordText="Set/Edit Allowed Payment Dates Profile"

RefreshText=""/>

<Columns>

<radG:GridTemplateColumn UniqueName="Delete">

<ItemTemplate>

<asp:LinkButton ID="DeleteCommandColumn" Text="Delete" CommandName="Delete" OnClientClick="if(!confirm('Are you sure you want to delete the Profile?')) {return false};" runat="server"></asp:LinkButton>

</ItemTemplate>

</radG:GridTemplateColumn>

<radG:GridBoundColumn DataField="Parent_Id" Display="False" UniqueName="Parent_Id"></radG:GridBoundColumn>

<radG:GridBoundColumn DataField="Company_Name" HeaderText="Client Name" UniqueName="Company_Name"></radG:GridBoundColumn>

<radG:GridBoundColumn DataField="AllowedPaymentDates" HeaderText="Allowed Payment Dates" UniqueName="AllowedPaymentDates"></radG:GridBoundColumn>

<radG:GridBoundColumn DataField="PortalName" HeaderText="Portal(s)" UniqueName="PortalName"></radG:GridBoundColumn>

<radG:GridBoundColumn DataField="CreatedBy" HeaderText="Created By" SortExpression="CreatedBy" UniqueName="CreatedBy" />

<radG:GridBoundColumn DataField="LastActivityDate" HeaderText="Last Activity Date" SortExpression="LastActivityDate" UniqueName="LastActivityDate" />

</Columns>

<EditFormSettings EditFormType="Template" CaptionDataField="Parent_Id" ColumnNumber="2">

<FormMainTableStyle BackColor="White" CellPadding="3" CellSpacing="0" GridLines="Horizontal" />

<FormTableStyle BackColor="White" CellPadding="2" CellSpacing="0" Height="110px" />

<FormStyle BorderStyle="None" Width="250px" />

<FormTableItemStyle Wrap="True" />

<EditColumn ButtonType="PushButton"

InsertText="Set" UniqueName="EditCommandColumn1"></EditColumn>

<FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>

<FormTableAlternatingItemStyle Wrap="False" />

<FormTemplate>

Please select the allowed Date Range.

<br />

<table>

<tr>

<td>

<radCln:RadCalendar ID="AllowedPaymentDates" UseEmbeddedScripts="false" AutoPostBack="false" runat="server" Font-Names="Arial,Verdana,Tahoma"

ForeColor="Black" Style="border-color: #ececec" EnableMultiSelect="true" EnableNavigation="false"

EnableRepeatableDaysOnClient="false" Skin="Inox" PresentationType="Interactive" EnableMonthYearFastNavigation="false"

Height="249px" Width="390px" RangeMaxDate="03/31/2008" RangeMinDate="03/01/2008"

ShowOtherMonthsDays="false" TitleAlign="Left" TitleStyle-ForeColor="#b9b9b9" UseColumnHeadersAsSelectors="true"

UseRowHeadersAsSelectors="true" ShowColumnHeaders="false" ShowRowHeaders="false">

</radCln:RadCalendar>

</td>

<td></td>

<td></td>

<td>

<div style="width:200px">

<span class="editLabel" style="font-size:medium">Please select which portal this profile is to be applied.</span>

</div>

<asp:RadioButtonList ID="Portaltype" runat="server" AutoPostBack="true" OnSelectedIndexChanged="PortalType_SelChg">

</asp:RadioButtonList>

</td>

</tr>

</table>

<asp:Button ID="btnUpdate" Width="40px" Font-Size="Smaller" TabIndex="10" Text='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "Submit" : "Update" %>' runat="server"

CommandName='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "PerformInsert" : "Update" %>'>

</asp:Button>

<asp:Button ID="Button1" Text="Cancel" Width="40px" Font-Size="Smaller" TabIndex="11" runat="server" CausesValidation="False"

CommandName="Cancel">

</asp:Button>

<br />

<br />

</FormTemplate>

</EditFormSettings>

<RowIndicatorColumn Visible="False">

<HeaderStyle Width="20px" />

</RowIndicatorColumn>

<ExpandCollapseColumn Visible="False">

<HeaderStyle Width="19px" />

</ExpandCollapseColumn>

</MasterTableView>

</

radG:RadGrid>

The RadGrid is populated by the objectdatasource, the calendar is being bound programatically by setting the calendar's selected dates in the code behind.

Thanks in advance,
Soumya

Tags
Grid
Asked by
soumi
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
soumi
Top achievements
Rank 1
Share this question
or