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

I am trying to create an appointment template with an image and a hyperlink. I need the image and hyperlink URLs to be retrieved from custom attributes. I am currently using asp ImageButton and hyperlink controls to do this, but I am having trouble formatting the tags to retrieve the URLs.

My template is as follows:

<AppointmentTemplate>
<div>
<table id="mainTable" cellspacing="0" cellpadding="0" border="0" frame="void">
<tr>
<td width="20">
<asp:ImageButton runat="server" ID="detailsButton" ImageUrl=<%# Eval("Attributes['DetailsIconURL']") %>
AlternateText='Show Details' />
</td>
<td>
<asp:HyperLink ID='LinkButton' Font-Underline="true" ToolTip=<%# Eval("Attributes['ToolTip']") %> NavigateUrl=<%# Eval("Attributes['NavigateURL']") %>
Font-Name="Arial" runat="server" Font-Size="8pt" Font-Names="Arial,Tahoma,Verdana" Text='<%# Bind("Subject")%>'>
</asp:HyperLink>
</td>
</tr>
</table>
</div>
</AppointmentTemplate>

2 questions:

1. How do I define and set custom attributes in codebehind?

2. How do I assign the custom attribute values (URLs in this case) to control attributes in asp control tags?

Helen
Telerik team
 answered on 15 Aug 2008
1 answer
68 views
Hi,

I have just recently purchased these controls and i am in need of some assistanse.

I need to use the RadScheduler to produce an online calender for my team. I am using SQL 2005 as my data source and i just need to no where to start off. How do i insert a record to my database through the control? how do i DataBind the control with my datasource? I have quite few questions but don't no where to start. I have got the trainer for this control but this shows dealing with data from an XML source.

Please Help!

Jonny
Yana
Telerik team
 answered on 15 Aug 2008
1 answer
97 views
In versions prior to Q2 2008, I could never get MarkFirstMatch to work with Opera (I'm running 9.27 of Opera).  It wouldn't let you type enter in the box.  So I just set MarkFirstMatch to false if the browser was Opera.  After updating to Q2 2008, I decided to check to see if this was fixed.  It now lets me type and hit enter, but there are still issues.  Inside of an UpdatePanel, I have three combo boxes, each with their own ObjectDataSource.  The SelectedValue of the first is used as a SelectParameter for the second and third.  The SelectedValue of the second is used as a SelectParameter for the third.  If I type in the third and press enter, a button after it in the aspx gets pressed (this doesn't happen in other browsers), and both the SelectIndexChanged event and the button's clicked event occur.  If I type in and press enter in either of the first two, all appears normal in terms of the events that occurs server-side, however client-side the third combo box's items are not updated (also the second's items are not updated if I type in the first).  Whatever I click on next produces a SelectedIndexChanged event to occur server-side, since the contents of the box Client-side (and the SelectedIndex) don't match what the server-side thinks is there.
Helen
Telerik team
 answered on 15 Aug 2008
1 answer
168 views

I have an aspx page which dynamically loads user controls via client ajax call (.ajaxRequest(argument)). On one of the user controls in an upload control which needs full postback. I can successfully add client function to kill ajax request from user control for full postback and everything works as expected however once you load another control I get javascript error. I tried ways of removing the function on other pages, well actually the server side event AjaxRequest on aspx page.
As a work around I have to add the OnRequestStart & OnResponseEnd on the aspx page and check which page and only cancel ajax if that page and it works fine but is there a better way?

function
Request(sender, args)
{
    //alert('Request start initiated by: ' + args.get_eventTarget());
    if (args.get_eventTarget() == "ControlsAddTrackControl$btnTrkFleUload")
    {
        args.set_enableAjax(
false);
    }
}

Regards

Missing User
 answered on 15 Aug 2008
1 answer
192 views
Does anyone have a code example for the clientside export to excel fucntion. Can't see one anywhere in the docs or examples.

I presume the clientside export wuld allow me to avoid retrieving and binding data to the Grid a second time.

Thx
Daniel
Telerik team
 answered on 15 Aug 2008
4 answers
223 views
I've been browsing all of the questions I can find regarding poor HTML view code formatting.

I found this response from April 08:
The RadEditor's for ASP.NET AJAX and latest editor for ASP.NET content filters automatically indent the content when you switch to HTML mode. That is why we decided to remove the Indent HTML checkbox, as the content is always indented in HTML mode.

However, the code is definitely not indented in our Editor for ASP.NET AJAX. Is there some other setting that we are missing here? The HTML view is really quite problematic.

See sample here:
<table><tbody><tr><td><img alt="Katherine Center" style="" src="/assets/psa_center.jpg">&nbsp;</td><td>&nbsp;<img alt="Sandra Cisneros" style="" src="/assets/psa_cisneros.jpg"></td><td>&nbsp;<img alt="Carolyn Forché" style="" src="/assets/psa_forche.jpg"></td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table><br>
Cole
Top achievements
Rank 1
 answered on 15 Aug 2008
3 answers
79 views
I have two RadComboBoxes per row inside a Repeater. Would someone please tell me the correct syntax for using AJAX to change the focus to the second ComboBox when a selection is made in the first ComboBox?

-Allan
Veselin Vasilev
Telerik team
 answered on 15 Aug 2008
3 answers
123 views
I am writing out a grid dynamically and I need to add a control to a specific cell. I am able to get the cell I need but the control does not appear in the cell.

TRC(

"TRC").Controls.Add(AddTRCLink(TRC.Cells(x).Text, Session("IDforAcc")))

For example or

TRC.Cells(x).Controls.Add(AddTRCLink(TRC.Cells(x).Text, Session("IDforAcc")))

the AddTRCLink fucntion returns a placeholder that has vavious other contols in it.  this works fine using the default gridview.

Also I am unble to even set the text property as a simple test.

Any Ideas?

Missing User
 answered on 15 Aug 2008
5 answers
210 views
Hi there!

I just upgraded the Prometheus beta version to the release. I'm using a treeview with the ExpandMode property set to ServiceSideCallback. This worked fine so far but now I receive a client side error message when trying to populate nodes saying the control has not been found or it would not implement the ICallbackEventHandler interface (which is the fact as far as I know).

Any suggestions?

Thanks,

Patrick
Simon
Telerik team
 answered on 15 Aug 2008
1 answer
260 views
Hello, this is the error i got , when i try to go to the page.

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
            System.Web.UI.ControlCollection.AddAt(Int32 index, Control child) +2108046
            Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +123
            [HttpException (0x80004005): Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error.]
            Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +171
            Telerik.Web.UI.RadAjaxControl.PerformRender() +418
            Telerik.Web.UI.RadAjaxControl.OnPageRender(HtmlTextWriter writer, Control page) +1222
            Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +87
            System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +98
            System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
            System.Web.UI.Page.Render(HtmlTextWriter writer) +26
            System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
            System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
            System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
            System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2558
            

i searched it in forums, an answer tells that this is a javascript error and try moving the code from <head> to <body> ,but since i used a masterpage, i can't do this, is there any answer for this?
help will be appriciated :)
Missing User
 answered on 15 Aug 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?