Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
89 views
I have a radchart that is a horizontal bar chart (so the X-Axis and Y-Axis are reversed).  The X-Axis (the vertical one in this case) has custom labels that are supposed to be right justified.  However, the right justification is only approximate.  It looks as if the strings with wider characters end further to the right than strings that have on average narrower characters.  The appearance seems as if the code that builds the bitmap uses a formula based on string length * font n-space rather than string.measure string to calculate the starting location of each label in this particular case.
Peshito
Telerik team
 answered on 09 Mar 2012
3 answers
72 views
As far as I understand Combobox doesn't support this key shortcuts. Is it going to be added in some future or is there any known way to add their support to combobox?

Kalina
Telerik team
 answered on 09 Mar 2012
1 answer
70 views
Hi,

I've recently upgraded to 2012q1 and noticed that there my labels width start to act freaky. I've a class in my main css that defines the width off all of my labels and suddenly the inputs started not to fill the whole  width set in the RadTextBox. Switching back to the old DLLs works fine.
Here is simple way to reproduce the issue:
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <style type="text/css">
        .labelClass
        {
            display: inline-block !important;
            width: 50px !important;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div style="width: 600px">
        <telerik:RadTextBox runat="server" ID="r1" Label="TEXT1" Width="49%" LabelCssClass="labelClass" />
        <telerik:RadTextBox LabelCssClass="labelClass" runat="server"  Width="49%"  ID="RadTextBox1" Label="TEXT2"
            /><br />
             
    </div>
    </form>
</body>
</html>


 in the attached file it is possiable to see the difference between the outputs.

I played with it and found that
the generated HTML is
<span id="r1_wrapper" class="riSingle RadInput RadInput_Office2010Silver" style="width: 49%;">
<label id="r1_Label" class="riLabel labelClass" style="width:40%;" for="r1">TEXT1</label>
<span class="riContentWrapper" style="width:60%;">
<input id="r1_ClientState" type="hidden" name="r1_ClientState" autocomplete="off">
</span>

so it looks like the custom width set via the CSS is ignored.

I've noticed that there is new property LabelCssWidth but it will take days to find and change all the label and I don't want to hardcode their width.

Will this be fixed in 2012Q2  or I should stay with the 2011Q2 ?
Vasil
Telerik team
 answered on 09 Mar 2012
1 answer
78 views
Hi,

I have a page with some controls and the last control which is below all other controls is a TreeList.
This TreeList can contain more data than it could fit on the screen, so it automatically gets bigger than the browser window and the
browser displays scroll bars. This could be ok, but the LoadingPanel image could be outside the viewport if there are too many rows.

So I want to prevent that the TreeList grows bigger than the page. I know I can set AllowScrolling to true, but this seems to work only for fixed heights, not relative ones.
Could you please tell me how I can prevent the TreeList from growing larger than the viewport?

Thanks!
Tsvetina
Telerik team
 answered on 09 Mar 2012
13 answers
219 views

Hi

I am testing a new website with IE8 and Chrome 2.0 and noticed some strange behavior with Telerik TreeView. I'm using Telerik.Web.UI Version 2009.2.701.35. On this Website, I have 2 TreeViews which works great in FireFox without any problems, but if I open the Website in Internet Explorer 8.0 or Chrome 2.0 the left TreeView doesn't work. Screenshots:

Website in IE 8.0: http://bit.ly/cqvc6

Website in Chrome 2.0: http://bit.ly/6YkBU


Both Browsers are installed on Windows Vista SP2 with default Settings (I made no changes to the configuration after installation)

 

In IE 8.0 I receive many of the following JavaScript Errors:

-------------------------------------------------------------------------------------------------------
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Tue, 21 Jul 2009 22:52:07 UTC

Message: 'this._element' is null or not an object
Line: 1931
Char: 1
Code: 0
URI: http://localhost:4500/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3ade-CH%3a0d787d5c-3903-4814-ad72-296cea810318%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.2.701.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3ade-CH%3a7e598a31-3beb-49a1-914c-5f530240f0ea%3a16e4e7cd%3af7645509%3a24ee1bba%3a1e771326%3ae524c98b%3ae330518b%3ac8618e41%3ae4f8f289%3aed16cbdc%3a874f8ea2%3a19620875%3a33108d14%3abd8f85e4

-------------------------------------------------------------------------------------------------------

 

Do you have any suggestions to fix this problem.

Thank you in advanced.


Beste regards

Mike Miller

Plamen
Telerik team
 answered on 09 Mar 2012
1 answer
69 views
I have a question about the groups. I see from the examples in the help about how the groups can be used with the core scripts that most controls use. What about other telerik controls?

I have one particular type of page that has a telerik grid, buttons, textboxes, combo boxes and a window on it. I use this same display page in numerous spots in my web application (but not on every page). Could I combine the scripts for these controls into a group so the script manager will cache these scripts in this combination and then know to get the cache for this page?
 
If so then how would I do that? So in other words when it encounters this page it gets the cached scripts for the control combination but if it encounters another page that say only has a radgrid and buttons on it then it would use the normal script combine method.
Simon
Telerik team
 answered on 09 Mar 2012
1 answer
79 views
When I click the edit button, I will get javascript error for "value of 1/1/0001 12:00:00AM is not valid for selecteddate. should between mInDate and MasDate, parameter name "SelectedDate".
My date field "ProcessedDate" is a read only field, not sure why I got this error and how to solve it?

<telerik:GridBoundColumn DataField="ProcessedDate" FilterControlAltText="Filter ProcessDate column"
                                               HeaderText="ProcessDate0" UniqueName="ProcessDate"  
                                              DataFormatString="{0:d}"  ReadOnly="True">
                                           </telerik:GridBoundColumn>
Thanks
Tsvetina
Telerik team
 answered on 09 Mar 2012
2 answers
146 views
Dear Sir,

I am unable to access controls inside a radmenu dynamic template. I am want to handle radlistbox selectedindexchanged event or access selectedvalue property when the menu item is clicked. Please help 

Private Sub mnuRoom_ItemClick(sender As Object, e As Telerik.Web.UI.RadMenuEventArgs) Handles mnuRoom.ItemClick
        If e.Item.Level = 0 Then
            Response.Redirect("~/Pages/Products.aspx?category=" & e.Item.Value)
        Else
            Dim lstCat As RadListBox = DirectCast(e.Item.FindControl("lstCategories"), RadListBox)
            Response.Redirect("~/Pages/Products.aspx?category=" & lstCat.SelectedValue)
        End If
    End Sub


   Private Sub Page_PreRender(sender As Object, e As System.EventArgs) Handles Me.PreRender
Using dbContext As New familia.OpenAccess.EntitiesModel
            mnuRoom.Items.Clear()
            Dim room As IQueryable(Of ProductCategory)
            room = From r In dbContext.ProductCategories Where r.IsActive = True And r.ParentCategory = 0 Select r
            For Each r In room
                Dim roomitem As New Telerik.Web.UI.RadMenuItem
                roomitem.DataItem = r
                roomitem.Value = r.CategoryID
                mnuRoom.Items.Add(roomitem)
                Dim mainmenuItemTemplate As New MainMenuItemTemplate()
                mainmenuItemTemplate.InstantiateIn(roomitem)
                Dim childItem As New RadMenuItem()
                childItem.CssClass = "mainmenudropdown"
                childItem.ItemTemplate = New MenuItemTemplate()
 roomitem.Items.Add(childItem)
Next
        End Using
End Sub



Class MenuItemTemplate
    Implements ITemplate
#Region "ITemplate Members"

    Public Sub InstantiateIn(container As Control) Implements ITemplate.InstantiateIn
        Dim parentItem As RadMenuItem = DirectCast(container.Parent, RadMenuItem)
        Dim room As ProductCategory = DirectCast(parentItem.DataItem, ProductCategory)
        'Dim div As New HtmlGenericControl("div")

        Dim contents As New Panel

       contents.CssClass = "menucontents"
        container.Controls.Add(contents)

        Dim categories As New Panel
        categories.CssClass = "menucategorypanel"

        Dim l As New Label
        l.ForeColor = System.Drawing.ColorTranslator.FromHtml("#1B75BC")
        l.Font.Size = 14
        l.Font.Bold = True
        l.Text = room.CategoryName

        categories.Controls.Add(l)

        Dim cat As New RadListBox

        cat.CssClass = "menucategorylist"
        Using dbContext As New familia.OpenAccess.EntitiesModel
room.RoomID))
            cat.DataSource = From c In dbContext.ProductCategories Where c.IsActive = True And c.ParentCategory = room.CategoryID Select c
            cat.DataTextField = "CategoryName"
            cat.DataValueField = "CategoryID"
            cat.ID = "lstCategories"
            cat.Width = 231
            cat.DataBind()

      End Using
       AddHandler cat.SelectedIndexChanged, New EventHandler(AddressOf lstCategories_SelectedIndexChanged)
        cat.Font.Size = 12
        categories.Controls.Add(cat)

        contents.Controls.Add(categories)

        Dim brands As New Panel
        brands.CssClass = "menubrandpanel"

        Dim b As New Label
        b.ForeColor = System.Drawing.ColorTranslator.FromHtml("#6B6B6B")
        b.Font.Size = 14
        b.Font.Bold = True
        b.Text = "TOP BRANDS"

        brands.Controls.Add(b)

        Dim bnd As New RadListBox
        bnd.CssClass = "menucategorylist"
        Using dbContext As New familia.OpenAccess.EntitiesModel
            bnd.DataSource = dbContext.ProductBrands.Where(Function(c) c.TopBrand = True And c.ProductCategories.Any(Function(r) r.CategoryID = room.CategoryID))

            bnd.DataTextField = "BrandName"
            bnd.DataValueField = "BrandID"
            bnd.Width = 231
            bnd.DataBind()
        End Using

        bnd.Font.Size = 12
        brands.Controls.Add(bnd)

        contents.Controls.Add(brands)

        Dim bottom As New Panel

        bottom.CssClass = "menucategorybottom"

        Dim bimg As New RadBinaryImage
        bimg.ImageUrl = "/images/layout/brand.png"
        bimg.ResizeMode = BinaryImageResizeMode.Fit
        bimg.Width = 20
        bimg.Height = 20
        bimg.CssClass = "buttonimage"
        bottom.Controls.Add(bimg)
        Dim brand As New RadButton
        brand.ButtonType = RadButtonType.LinkButton
        brand.CssClass = "brandbutton"
        brand.Font.Bold = True
        brand.Font.Size = 10
        brand.Text = "All Brands"
        bottom.Controls.Add(brand)

        Dim bdimg As New RadBinaryImage
        bdimg.ImageUrl = "/images/layout/BestDeals.png"
        bdimg.ResizeMode = BinaryImageResizeMode.Fit
        bdimg.Width = 20
        bdimg.Height = 20
        bdimg.CssClass = "buttonimage"

        bottom.Controls.Add(bdimg)

        Dim deals As New RadButton
        deals.ButtonType = RadButtonType.LinkButton

        deals.CssClass = "brandbutton"
        deals.Font.Bold = True
        deals.Font.Size = 10
        deals.Text = "Best Deals"
        bottom.Controls.Add(deals)

        Dim psimg As New RadBinaryImage
        psimg.ImageUrl = "/images/layout/Premimum.png"
        psimg.ResizeMode = BinaryImageResizeMode.Fit
        psimg.Width = 20
        psimg.Height = 20
        psimg.CssClass = "buttonimage"

        bottom.Controls.Add(psimg)

        Dim pre As New RadButton
        pre.ButtonType = RadButtonType.LinkButton
        pre.CssClass = "brandbutton"
        pre.Font.Bold = True
        pre.Font.Size = 10
        pre.Text = "Premium Selections"
        bottom.Controls.Add(pre)

        Dim nimg As New RadBinaryImage
        nimg.ImageUrl = "/images/layout/new.png"
        nimg.ResizeMode = BinaryImageResizeMode.Fit
        nimg.Width = 20
        nimg.Height = 20
        nimg.CssClass = "buttonimage"

        bottom.Controls.Add(nimg)

        Dim ne As New RadButton
        ne.ButtonType = RadButtonType.LinkButton
        ne.CssClass = "brandbutton"
        ne.Font.Bold = True
        ne.Font.Size = 10
        ne.Text = "Recently Added"
        bottom.Controls.Add(ne)
        contents.Controls.Add(bottom)

  End Sub

    Private Sub lstCategories_SelectedIndexChanged(sender As Object, e As System.EventArgs)

    End Sub
#End Region
End Class
Zafar
Top achievements
Rank 1
 answered on 09 Mar 2012
1 answer
76 views
I am having a RadTreeList control in my page. I need to validate that every first hierarchy items(0th Nested Level items) can have only 5 levels of children( not 5 children) i.e., each 0th Nested Level items can have 5 hierarchical levels. I am using both item creation method and drag-drop method. While dragging from some item to an item, I need to validate that the destination item has only 5 hierarchical levels after dropping. If the sum of hierarchical levels is equal or greater than 5, then the dragged item should not be allowed to drop to the destination item.
Can anyone help for this.

Thanks in Advance,
Abilash
Daniel
Telerik team
 answered on 09 Mar 2012
7 answers
111 views
Hi,

I am using Rad Scheduler to show the appointment on daily basis. What i want is, that if there is no appointment for a particular slot then that slot should not be created.
for example i have this on datatable  
9:00 Am to 10:00 Am | Do something
10:00 Am to 11:00 Am | Do nothing
and then
1:00 Pm to 2:00 Pm | Do something Again

so what i did, i have set 9:00 Am as start time and 2:00 Pm as end time
it had also created time slot for 11:00 to 12:00 and 12:00 to 1:00 which are not in Datatable.

i did tried 
 if (e.TimeSlot.Appointments.Count < 1)
        {
            e.TimeSlot.Control.Visible = false;
          }
but still i can see hours on Hours Column and blank space in between the time slot.
is there any way i can stop the time slot from creating or create timeslot according to slot's in Datatable.
Please help.
Thanks 
Prashant Rawat
 
Plamen
Telerik team
 answered on 09 Mar 2012
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?