Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
81 views
I'm trying to add a hyperlink and custom text to the AppointmentTemplate but getting a Javascript error. Here's the template markup:

<AppointmentTemplate>
    <div class="rsCustomAppointmentContainer">
        <a href="finance.aspx">
            <%# Eval("FinancialLink.Text")%></a>
        <div>
        </div>
    </div>
</AppointmentTemplate>
<ResourceTypes>
    <telerik:ResourceType KeyField="FinancialLogID" Name="FinancialLink" 
    TextField="FinancialLogNumber"
        ForeignKeyField="FinancialLogID" DataSourceID="EntityDataSource3" />
</ResourceTypes>

Here's the script error:

}var m=this.getAppointmentDomElement(n.eventMapTarget);
var j=this.getAppointmentFromDomElement(m);
var l=(j.get_allowDelete()!=null)?j.get_allowDelete():this.get_allowDelete();

Could someone pointing me in the right direction? Ideally, I want to build a hyperlink that includes query string parameters. The full Scheduler code is at the very end.

Thanks,

Ken


<telerik:RadScheduler ID="RadScheduler2" runat="server" DataEndField="DateEntered"
    DataKeyField="FinancialLogID" Height="558px" DataStartField="DateEntered" EnableEmbeddedSkins="true"
    EnableViewState="true" DataSourceID="EntityDataSource3" StartEditingInAdvancedForm="false"
    DataSubjectField="FinancialLogNumber" HoursPanelTimeFormat="htt" Skin="Web20"
    ValidationGroup="RadScheduler1" ShowFooter="true" SelectedView="MonthView" Width="670px"
    ShowFullTime="true" RowHeight="23px" AllowDelete="False" AllowInsert="False"
    Visible="False">
<AppointmentTemplate>
<div class="rsCustomAppointmentContainer">
<a href="finance.aspx">
<%# Eval("FinancialLink.Text")%></a>
<div>
</div>
</div>
</AppointmentTemplate>
<ResourceTypes>
<telerik:ResourceType KeyField="FinancialLogID" Name="FinancialLink" 
TextField="FinancialLogNumber"
ForeignKeyField="FinancialLogID" DataSourceID="EntityDataSource3" />
</ResourceTypes>
    <WeekView HeaderDateFormat="dd MMM yy" />
    <MonthView HeaderDateFormat="MMM yy" />
    <DayView HeaderDateFormat="dddd, MMM d, yy" />
    <TimelineView UserSelectable="false" />
</telerik:RadScheduler>
Peter
Telerik team
 answered on 20 Aug 2012
4 answers
303 views
Hi.  I have a page that contains a RadPanelBar - but within it, I'm trying to put in a RadGrid.  However, for whatever reason, the backend code doesn't recognize the grid inside the PanelBar (ItemTemplate).

Here is what I have.... Am I missing something?
<telerik:RadPanelBar ID="AccountPanels" runat="server" Width="100%" ExpandMode="FullExpandedItem">
    <Items>
        <telerik:RadPanelItem Text="Design History" runat="server" Expanded="True">
            <Items>
                <telerik:RadPanelItem runat="server" Value="OrderHistory">
                    <ItemTemplate>
                        <div style="height:350px; overflow-x:hidden; overflow-y:auto;">
                            <div style="width:97%;">
                                <div>
                                    <asp:Label ID="lblOpenItems" runat="server" Text="If you have any open unsaved items, they will show up in the grid below.  You can choose to edit, save and add to your cart.<br />Or you can choose to remove the item(s) permanently."></asp:Label><br /><br />
                                </div>
                                <asp:Panel ID="PnlOpenItems" runat="server">
                                    <telerik:RadAjaxManagerProxy ID="RadAjaxManager1" runat="server">
                                        <AjaxSettings>
                                            <telerik:AjaxSetting AjaxControlID="grdOpenItems">
                                                <UpdatedControls>
                                                    <telerik:AjaxUpdatedControl ControlID="grdOpenItems" />
                                                </UpdatedControls>
                                            </telerik:AjaxSetting>
                                        </AjaxSettings>
                                    </telerik:RadAjaxManagerProxy>
                                    <telerik:RadGrid ID="grdOpenItems" OnNeedDataSource="Item_NeedDataSource" OnItemDataBound="Item_ItemDataBound" runat="server" AutoGenerateColumns="false" AllowPaging="false">
                                        <ClientSettings>
                                            <Scrolling AllowScroll="True" ScrollHeight="150px" UseStaticHeaders="true" />
                                        </ClientSettings>
                                        <MasterTableView NoMasterRecordsText="You have no unsaved items at this time.">
                                            <Columns>
                                                <telerik:GridBoundColumn HeaderText="Customer ID" DataField="EntityContactNumber" Visible="false">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn HeaderText="Custom ID" DataField="CustomID">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn HeaderText="Item Number" DataField="ItemNumber">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn HeaderText="Template Name" DataField="FriendlyName">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn HeaderText="Date Created" DataField="DateAdded">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn HeaderText="DateModified" DataField="DateModified" Visible="False">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn HeaderText="CartId" DataField="CartId" Visible="False">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridButtonColumn UniqueName="btnEdit" HeaderText="Edit" DataTextField="ItemNumber">
                                                </telerik:GridButtonColumn>
                                                <telerik:GridButtonColumn UniqueName="btnDelete" HeaderText="Remove" DataTextField="CustomID">
                                                </telerik:GridButtonColumn>
                                            </Columns>
                                        </MasterTableView>
                                    </telerik:RadGrid>
                                </asp:Panel>
                            </div>
                        </div>
                    </ItemTemplate>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelItem>
        <telerik:RadPanelItem Text="Previously Shipped Designs" Expanded="True" runat="server">
            <Items>
                <telerik:RadPanelItem runat="server" Value="MyProfile" Height="400px">
                    <ItemTemplate>
                        <telerik:RadAjaxPanel ID="ProfileAjax" runat="server">
                            <div style="height:350px;overflow-x:hidden;overflow-y:auto;">
                                <div style="width:97%;">
                                     
                                </div>
                            </div>
                            <asp:Panel ID="ProfileMessageHolder" runat="server" Visible="false" HorizontalAlign="Center">
                                <strong>Your profile has been saved</strong>
                            </asp:Panel>
                        </telerik:RadAjaxPanel>
                    </ItemTemplate>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelItem>
    </Items>
</telerik:RadPanelBar>

Mark
Top achievements
Rank 1
 answered on 20 Aug 2012
3 answers
135 views
HI,

I am using the ExcelML format to export a grid and have a couple of questions regarding the formatting.
1.  How can apply a border to the header row.  I have looked at the following code that is in the documentation and added it to the

ExcelMLExportStylesCreated event but it gives me an error message Object reference not set to an instance of an object. on this line

- borderStyle.PositionType = DirectCast(i, PositionType)

Also I can't figure out how to apply the style to the header row.

Dim cstyle As New StyleElement("MyCustomStyle")
        Dim borders As New BorderStylesCollection()
        Dim borderStyle As BorderStyles
        For i As Integer = 1 To 4
            'four borders   
            borderStyle.PositionType = DirectCast(i, PositionType)
            borderStyle.Color = System.Drawing.Color.Black
            borderStyle.LineStyle = LineStyle.Continuous
            borderStyle.Weight = 1.0R
            borders.Add(borderStyle)
        Next
        For Each border As BorderStyles In borders
            cstyle.Borders.Add(border)
        Next
        e.Styles.Add(cstyle)

 

2.  How can I insert a row at the beginning of the output.  I have seen many examples on how to do this when using the HTML format but there are no examples when using the ExportML format.  The following can be used for the HTML format but there is no <body> tag in when you use the ExportML

Protected Sub rgSummaryReport_GridExporting(source As Object, e As Telerik.Web.UI.GridExportingArgs)

Dim title As String = If(_reportCriteria.AppIsFinalSubmitted, " Final-Submission Report", "Pre-Submission Report")

Dim strHeader As New StringBuilder("<h3><center>" + title + "</center></h3><br>")

strHeader.Append("<h5><b>Contract ID: " + Session("contract_id") + "<br>")

strHeader.Append("Contract Name: " + Session("contract_name") + "<br><br>")

strHeader.Append("Report data is valid as of " + lblReportTimestamp.Text + "</b></h5>")

e.ExportOutput = e.ExportOutput.Replace("<head>", "<head><style type=""text/css"">td {border: 0.1pt solid #000000;}</style>")

e.ExportOutput = e.ExportOutput.Replace("<body>", "<body>" + strHeader.ToString())

e.ExportOutput = e.ExportOutput.Replace("</body>", "Report Downloaded: " + DateTime.Now.ToString() + "</body>")

End Sub

  


Thank you for your help.

Tracy

Daniel
Telerik team
 answered on 20 Aug 2012
3 answers
110 views
Hi,

I'm evaluating RadComboBox for multi-column drop down support. The scenario is load on demand from webservice and allow users to add new items in the combo from client side.

I can see that there is sample available here but it is without using templates. Using grid inside RadComboBox will be very complex as I have to insert new items to the grid from client side which I'm not sure is possible or not.

How can I add new items to multi column RadCombox? If that is not possible please suggest any possible workarounds or other Telerik controls that can be used.

Regards,
Piyush




Kalina
Telerik team
 answered on 20 Aug 2012
1 answer
167 views
Hi,

I am using three related Rad comboboxes in my application. when i change value in any parent combo box then it causes so much time and shows Rad Ajax Loading panel .How i will improve the performance.

may be its possible that i m using trial version of Telerik Rad Ajax controls.......?
Any ideas? 

Thanks in advance...
Cat Cheshire
Top achievements
Rank 1
 answered on 20 Aug 2012
2 answers
91 views
Hi All,

I am new to Telerik - 1 day total experience.  I have a user control that contains only one control: RadGrid.
My control is in a form.  The form is in the main content of the site.master page.  

At design time, everything looks find.  At run time, the grid does not show up at all.  I tried everything, include setting the PageStyle.AlwaysVisible = true and setting the data source to empty object (.datasource = new object(){}).

What could be wrong?  

Thanks.
Andrey
Telerik team
 answered on 20 Aug 2012
10 answers
226 views
Is IE10 supported in newer versions? I am using Telerik.Web.UI.dll  v.2011.2.712.40 and lots of things arent working.

Thanks

Kevin
Helen
Telerik team
 answered on 20 Aug 2012
3 answers
410 views
We Want to show User wise data in hierarchy form. where one user reports to another user.

Like :

1) User1 --- (Director1)
   user1 data
    2) user2 reports to user1 (RSM)
        user2 data 
    2) user3 reports to user1 (RSM)
        user3 data
         3) user4 reports to user3 (ASM)
             user4 data
1) User...--- (Director2)

Please click on this link to download the Source Code
http://aspspider.org/ramankumarsingla/TelerikRoleWiseUserDetails.zip

Thanks and regards
raman singla
Raman
Top achievements
Rank 1
 answered on 20 Aug 2012
4 answers
736 views
I have attempted to call a client-side JS funciton using:

    ClientEvents-OnValueChanged="clearErrorMsg"
    ClientEvents-OnBlur="clearErrorMsg"
    ClientEvents-OnValueChanging="clearErrorMsg"

and server side using:
    radDatePicker.ClientEvents.OnDateSelected = "clearErrorMsg";
    radDatePicker.DateInput.ClientEvents.OnValueChanged = "clearErrorMsg";
    radDatePicker.DateInput.ClientEvents.OnBlur = "clearErrorMsg";

either way the JS function does not get called. The ClientEvents-OnError="OnError" in the following code works just fine

<script language="javascript">
    function OnError(sender, args) {
        var datePicker = $find(sender.get_id());
        var MinDate = new Date(datePicker.get_minDate());
        var MM_Min = MinDate.getDate();
        var DD_Min = MinDate.getMonth() + 1;
        var YY_Min = MinDate.getFullYear();
        var MaxDate = new Date(datePicker.get_maxDate());
        var MM_Max = MaxDate.getDate();
        var DD_Max = MaxDate.getMonth() + 1;
        var YY_Max = MaxDate.getFullYear();
        var sMinDate = DD_Min + "/" + MM_Min + "/" + YY_Min
        var sMaxDate = DD_Max + "/" + MM_Max + "/" + YY_Max
        //alert("Please enter a valid date between " + sMinDate + " and " + sMaxDate);
        datePicker.focus();
        var errorID = sender.get_id() + "_error";

        if ($("#" + errorID) != null) {
            $("#" + errorID).remove();
        }
        $("#" + sender.get_id()).parent().parent().parent().parent().parent().after('<div id="' + errorID + '" class="valErrorUp DateValError"> Please enter a valid date between ' + sMinDate + ' and ' + sMaxDate + '</div>');
}

function clearErrorMsg(sender, args) {
    alert('got here');
    var datePicker = $find(sender.get_id());
    var errorID = sender.get_id() + "_error";

    if ($("#" + errorID) != null) {
        $("#" + errorID).remove();
    }
}
</script>

<telerik:RadDatePicker ID="radDatePicker" runat="server" Width="100px" CssClass="IndentAnswer" DateInput-FocusedStyle-BackColor="#F1F6FC"  ClientEvents-OnDateSelected="clearErrorMsg">
    <DateInput ClientEvents-OnError="OnError" ClientEvents-OnValueChanged="clearErrorMsg"  ClientEvents-OnBlur="clearErrorMsg" ClientEvents-OnValueChanging="clearErrorMsg"></DateInput>
    <Calendar ViewSelectorText="x" ShowRowHeaders="false" ClientEvents-OnDateSelected="clearErrorMsg"></Calendar>
</telerik:RadDatePicker>

What I am I missing?

Thanks in advance.
Keith
Martin
Telerik team
 answered on 20 Aug 2012
3 answers
76 views
To replicate

Create a new RadControlsWebApplication
Copy files from \Live Demos\Ajax\Examples\Common\LoadingUserControls
Remove the Telerik Header and Footer tags
Set NameSpace for all added files to your webapplication name.class
Build and Run

The ajaxloading panel is not working, I also tried setting the project to compile against the 4.0 runtime instead of the 4.5 but same results.

Thanks
Martin
Telerik team
 answered on 20 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?