Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
84 views
I'm trying to use radajaxpanel in my page, but got the below exception.

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

Below is the code how am trying to use this in my page.

 <div id="pnlAddView">
            <telerik:radajaxpanel id="upSave" loadingpanelid="RadAjaxLoadingPanel1" runat="server">
                  <asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox>
                  <br />
                  <asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" />
                </telerik:radajaxpanel>
        </div>
        <div id="pnlMessageView" style="display: none;">
            Some static contents here.
        </div>


Thanks.

Umar
Top achievements
Rank 1
 answered on 11 May 2011
4 answers
535 views
I have two RadComboBoxes on my page that I can not reset.  Below is their definition and the code behind I am using to reset them.  I have two other RadComboboxes on that same page that I CAN reset.  The main difference is that the two I can not reset are "LoadOnDemand".  I've searched the forums and found a few people with the same problems, but I don't see an answer that works yet.

See attached image for example...

Help?

Thanks

Mark

HTML:
<telerik:RadComboBox ID="cboAgencies" runat="server" EmptyMessage="Type to 
Search..."<BR>                                                            
EnableAutomaticLoadOnDemand="true" EnableVirtualScrolling="true" 
ItemsPerRequest="100"<BR>                                                            
AutoPostBack="true" MarkFirstMatch="True" Skin="WebBlue" Width="205px" 
OnSelectedIndexChanged="cboAgencies_SelectedIndexChanged"><BR>                                                            
<WebServiceSettings Method="GetAgencies" Path="Talent.aspx" 
/><BR>                                                        
</telerik:RadComboBox><BR><BR> <telerik:RadComboBox ID="cboAgents" 
runat="server" EmptyMessage="Type to 
Search..."<BR>                                                            
EnableAutomaticLoadOnDemand="true" EnableVirtualScrolling="true" 
ItemsPerRequest="100"<BR>                                                            
MarkFirstMatch="True" Skin="WebBlue" Width="205px" AutoPostBack="true" 
OnSelectedIndexChanged="cboAgents_SelectedIndexChanged"><BR>                                                            
<WebServiceSettings Method="GetAgents" Path="Talent.aspx" 
/><BR>                                                        
</telerik:RadComboBox><BR>

Code Behind(on a Button Click):

 

<P>cboAgencies.Text = null;    //Also tried 
""<BR>cboAgencies.SelectedValue = null;<BR>cboAgencies.ClearSelection();</P>
<P><BR>cboAgents.Text = null;<BR>cboAgents.SelectedValue = 
null;<BR>cboAgents.ClearSelection();</P>
Kalina
Telerik team
 answered on 11 May 2011
1 answer
39 views
Hi,
I've been developing project using the RadDock control and have just noticed, when a user drags a dock, it can be dragged infinitely to the right or to the bottom of the page. I tried it on your demo page and saw the same thing - try it. Go here: http://demos.telerik.com/aspnet-ajax/dock/examples/default/defaultcs.aspx
Pick up one of the docks and drag your mouse out to the right...it just keeps going. Is there a way to stop this, so that it won't allow dragging outside the width or height of the main dock area? 

Thanks
Pero
Telerik team
 answered on 11 May 2011
3 answers
121 views
I was just wondering if there was a way to limit floating RadDocks to within the screen bounds? 
Pero
Telerik team
 answered on 11 May 2011
5 answers
274 views
Hello,

I have a dynamically created raddcok and  in which user control is loaded.

I want to update the user control contents on one of the command item click event. Well how is it possible to refresh the contents (may be page load event of the user control need to be called) ?

Protected Sub RadDock_Command(ByVal sender As Object, ByVal e As DockCommandEventArgs)
      if  e.Command.Name = "doRefresh" Then
            Dim doc2Refresh As String = DirectCast(sender, RadDock).UniqueName
            ' expect to refresh user control loaded within raddock.
           End If
    End Sub


Thanks.
Pero
Telerik team
 answered on 11 May 2011
1 answer
63 views
Why are the hot fixes not done as .msp files - due to local administrative rights policies in place at our organization we're finding it difficult to simply copy/paste the hot fix files over the originall installed files.  If we had a simple .msp file our lives would be made so much simpler.
Erjan Gavalji
Telerik team
 answered on 11 May 2011
1 answer
344 views
Hello,

We are using the following column definition for a button column that should display a DateTime:

<telerik:GridButtonColumn UniqueName="STARTDATE" ButtonType="LinkButton"
       DataTextField="STARTDATE" DataTextFormatString="{0:g}" HeaderText="[START DATE]"
       CommandName="GoToItem" />

The problem is that it is standard in our app to display just the date if the time is "12:00 am", as this usually indicates that the exact time was not entered. Therefore, I need to conditionally use "{0:d}" for my format string instead of "{0:g}" when StartDate.TimeOfDay.Ticks=0.

We have a server-side function with the following format that we usually use for this logic:
public static string GetShortDateTimeString(DateTime? aDateTime)

In the past, we've either called the function in the ItemDataBound event or used a GridTemplateColumn with a LinkButton to call the function:
<telerik:GridTemplateColumn HeaderText="[START DATE]"DataField="STARTDATE" UniqueName="STARTDATE">
    <ItemTemplate>
      <asp:LinkButton ID="lnkSTARTDATE" runat="server"
            Text='<%#GetShortDateTimeString((DateTime?)Eval("STARTDATE"))%>'
            OnCommand="lnkViewGrid_Command" CommandArgument='<%# Eval("OID").ToString() %>'/>
    </ItemTemplate>
     </telerik:GridTemplateColumn>

My question is whether there is something I can do in the GridButtonColumn definition to create this complex formatting logic, or if I have to use one of those two options. I tried using the GridButtonColumn "Text" field but got an error when I tried to load the page:

Databinding expressions are only supported on objects that have a DataBinding event. Telerik.Web.UI.GridButtonColumn does not have a DataBinding event.


--Christina

Marin
Telerik team
 answered on 11 May 2011
1 answer
47 views
I'm starting to manage RadSheduler, and I know how to change the Tooltip of dating.Thanks for your help
Veronica
Telerik team
 answered on 11 May 2011
2 answers
115 views
The MaxTextLength property checks the limit on submit, but I need a way of stopping any characters being entered once the limit has been reached, I'm prepared to take the performance hit.

I can display an alert message once the limit is reached, but how can I stop any more text being entered?

NB: The users can only see the text entry view, the HTML view is hidden, and the character limit is for the text entered, not the html length.

The function I have so far is:-
<script type="text/javascript">
    function OnClientLoad(editor) {
        editor.attachEventHandler("onkeydown", function (e) {
            var content = editor.get_text(); //returns the editor's content as plain text
            var words = 0;
            if (content) {
                var punctRegX = /[!\.?;,:&_\-\-\{\}\[\]\(\)~#'"]/g;
                var contentcontent = content.replace(punctRegX, "");
                var trimRegX = /(^\s+)|(\s+$)/g;
                contentcontent = content.replace(trimRegX, "");
                if (content) {
                    splitRegX = /\s+/;
                    var array = content.split(splitRegX);
                    words = array.length;
                }
            }
            var counter = $get("counter");
              
            var limit =<%  Response.Write(charimit.ToString());%>
            counter.innerHTML = "Words: " + words + " Characters: " + content.length;
            if(content.length > limit)
            {
                alert("Too many characters!");
                 
            }
  
        });
    }
  
</script>

Ideally, after the alert has popped up, the character that had just been entered would be deleted, or at least future entry would be prevented (although any deletions would have to be allowed).

Thanks
AP
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 11 May 2011
1 answer
89 views
Hello Telerik,

I have a question, in our project we are using Dundas Charts, and we have a requirement that charts we are displaying should be exported to PDF on a button click. I see that telerik provide PDF export option but I was wondering weather it supports Dundas charts if it dose can you please provide some sample or tutorial kind of thing !!!


Thanks,
Education Dynamics
Sebastian
Telerik team
 answered on 11 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?