Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
137 views
Hi,

I am trying to add a web user control(.ascx) in the RAD Toolbar. But the toolbar is not showing the user control. Can you please guide me where am i going wrong.

Following is  my code snippet:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim paths() As String
        'Dim TaggerTemplate As TaggerTemplate

        Dim tlbBtn As RadToolBarButton
        tlbBtn = New RadToolBarButton("Tagger")
        tlbBtn.ItemTemplate = New TaggerTemplate()
        RadFileExplorer1.ToolBar.Items.Add(tlbBtn)

        'TaggerTemplate = New TaggerTemplate
        'Dim item As RadToolBarItem = tlbBtn
        'TaggerTemplate.InstantiateIn(item)
        'item.ItemTemplate = New TaggerTemplate()

        'RadFileExplorer1.ToolBar.DataBind()

    End Sub



Public Class TaggerTemplate
    Implements ITemplate


    Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn
        Dim tagger As CtrlTagger

        tagger = New CtrlTagger
        tagger.ID = "TagItem"
        ' container.Controls.Add(tagger)


        Dim wrapperDiv As HtmlGenericControl = New HtmlGenericControl("DIV")
        wrapperDiv.Controls.Add(tagger)
        container.Controls.Add(wrapperDiv)
    End Sub


End Class

Amarjyoti
Top achievements
Rank 1
 answered on 14 Aug 2010
3 answers
354 views
in one of my prototype app, i am using Telerik MVC extension datepicker control. i have two fields "From" and To". on selection of a from date, the minDate for "To" field has to be changed to the selected "from" date.

this has to happen through client (JQuery). can anyone help me on how to access the minDate() property of datepicker using JQuery.
I debugged the object to see the properties, but i could not get anything similar to minDate.

my code:
1. onchange of from, i call a javascript function and access the from date 
var fromDate = $("#fromDate").data("tDatePicker").value(); 
2. now i need to set the minDate for "To".

my control code:
<%
           Html.Telerik().DatePicker()
                      .Name("toDate")
                      .Format("dd-MMM-yyyy")
                      .ButtonTitle("Select To Date")
                      .ClientEvents(actions => { actions.OnChange("calculateDays"); })
                      .InputHtmlAttributes(new { @readonly = "true", maxLength="11", @style = "font-size:11px;width:100px;" })
                      .ShowButton(true)
                      .Render();
   %>
                                                        
Milind
Top achievements
Rank 1
 answered on 14 Aug 2010
4 answers
267 views
Hey,
  I've searched the forums for a solution but can't seem to find one that will work.  I have a radmenu in a masterpage and when I go to a page I need the selected item to display an image (a:focus in stylesheet) just like when it's hovered over.  The problem is the master page is refreshed each time a new page is accessed. I tried the code below, but didn't work with the code I have.  Any help would be greatly appreciated. 

if (!IsPostBack)
        {
            RadMenu1.LoadContentFile("menu.xml");
        }
        RadMenuItem item = RadMenu1.FindItemByUrl(Request.Url.PathAndQuery);
        if (item != null)
        {
  
             item.CssClass = "Focused";
         }

I've pasted in all of the relavent code below ( I think ). 

radmenu code from masterpage
<telerik:RadMenu ID="RadMenu1" Runat="server" CssClass="menuNav" 
                             EnableAjaxSkinRendering="False" 
                         EnableEmbeddedSkins="False" DataSourceID="SiteMapDataSource1" >
                    </telerik:RadMenu>

sitemap - I can use the menu.xml format if needed.  whatever works.
<?xml version="1.0" encoding="utf-8" ?>
    <siteMapNode url="" title=""  description="">
        <siteMapNode url="Doctors.aspx" title="Doctors"  description="" />
        <siteMapNode url="Testimonials.aspx" title="Testimonials"  description="" />
      <siteMapNode url="Departments.aspx" title="Departments"  description="" />
      <siteMapNode url="Contact.aspx" title="Contact Us"  description="" />
        
    </siteMapNode>
</siteMap>

CSS -  appied to div containing the radmenu

.menuNav /*radmenu class- not used*/
{   
      
}
  
#navigationDiv a, #navigationDiv a:visited
{
    height:37px;
    text-decoration:none;
    color:#0069aa;
}
  
  
#navigationDiv a:hover, #navigationDiv a:active, #navigationDiv a:focus
{
    height:37px;
    background-image:url(images/hoverImage.jpg);
    background-position:center;
    background-repeat:no-repeat;
    color:#0069aa;
      
}
lafon Clark
Top achievements
Rank 1
 answered on 14 Aug 2010
5 answers
186 views
Hello Telerik Team,

I have two tabs with two UserControls loaded inside them.
How do I save the state of one tab i.e; if I click on something inside tab 2, it eventually causes a postback which then causes tab1 to lose its content. I have enabledviewstate = true but still I am not able to maintain the State of one tab if content in other tab is changed.

Help in this issue is greatly appreciated.

Thanks,
Smith
Johan
Top achievements
Rank 1
 answered on 13 Aug 2010
1 answer
101 views
How do you center all the content vertically in the rows of a RadGrid?  Especially when a given row has a photo and then regular text which is clearly not as tall.  Thanks
Cori
Top achievements
Rank 2
 answered on 13 Aug 2010
2 answers
425 views
Hi,

I am trying to add validation to a RadTextBox that will cause validation to occur when the text box loses focus.

The scenerio is: If a user uses the Tab key to move out of a text box that is a reuired field, I am trying to display an error message stating that the field is a required field. I tried using RequiredFieldValidator control, which works fine when user submits, and CustomValidator control setting setting ValidateEmptyText to true.

Is there a way that this can be done client-side without writing JavaScript? If JavaScript needs to be written, what are some of the key calls to make?

Thanks in advance.
gary
Top achievements
Rank 1
 answered on 13 Aug 2010
2 answers
210 views
Hi,

I have a RadMaskedTextbox to enter date in my app.

We have special requirement that user should be able input partial dates. Example if user don’t know the day they should be able to specify a special character like example “?”. 03/?/1998.  Is there any way I can allow RadMaskedText or any other Telerik control to work like this?

Thank you,

usr9999
Top achievements
Rank 1
 answered on 13 Aug 2010
2 answers
132 views
I was looking at the Sitefinity CMS and was curious as to how the generic content editor appears on the page as it does? (figure 2 in the link provided): http://www.sitefinity.com/help/developer-manual/generic-content-public-controls.html.
I have a project where I open an editor for HTML on a web page and currently the editor opens in a RadWindow. The Sitefinity way of doing is seems much faster and provides the added functionality of opening another "window" inside the editor window (figure 3 in the link provided). If possible I would love to see an example project of how to do this, if not I would simply like to know what Rad Control is used to display the editing window.

Edit: After looking at some of the videos it appears that it is a RadWindow, if it is then is the parent for the second window (figure 3) the page, or the first window? Also how does it load so fast? My RadWindow takes ~5 seconds to load.
Dan Miller
Top achievements
Rank 1
 answered on 13 Aug 2010
1 answer
142 views
How can I programatically or thru Javascript open only 1 RadDock at a time?
Petio Petkov
Telerik team
 answered on 13 Aug 2010
3 answers
106 views
Hello!
I have an Editor on my page with AutoResizeHeight property set to true. The Edior pretty resizes his height when I type text and use Paste commands from toolbar and context menu, but does nothing when I paste text using Ctrl+V keys combination. 
The definition of my Editor looks like this:
 <telerik:RadEditor ID="fld_editor_DOCTEXT" runat="server" ContentFilters="RemoveScripts, MakeUrlsAbsolute, FixUlBoldItalic, IECleanAnchors"
                    EditModes="Design" Height="115px" Skin="Windows7" Width="750px" OnClientLoad="OnRadEditorLoad"
                    AutoResizeHeight="true" OnClientCommandExecuted="OnDocTextCommandExecuted" StripFormattingOptions="NoneSupressCleanMessage"
                    OnClientPasteHtml="OnHTMLPasted">
.........................................................

I use 2010.1.519.35 version of Telerik.Web.UI.dll
Please, help me with this issue.

Rumen
Telerik team
 answered on 13 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?