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

We are able to declare a custom styles list correctly.  The issue that we have is when we apply a custom style to a selection the RadEditor defaults to wrapping the selection in "Font" tags.  We want it to wrap in "Div" tags, instead.

Given the following HTML code, before applying styles:

<p>my text document looks kind of like this.
And sometimes I highlight a whole tag like this:</p>
  
<p>MY HEADER</p>
  
<p>or maybe I highlight text INSIDE OF THIS P TAG and turn it into a subparagraph.</p>

Here is what we get when we apply styles:

<p>my text document looks kind of like this.
And sometimes I highlight a whole tag like this:</p>
  
<p class="section header">MY HEADER</p>
  
<p>or maybe I highlight text <FONT class="section subparagraph">INSIDE OF THIS P TAG</FONT> and turn it into a subparagraph.</p

And here is what we want (The <p> tags for MY HEADER and the <FONT> tags inside the second sentence to be <div> tags):

<p>my text document looks kind of like this.
And sometimes I highlight a whole tag like this:</p>
  
<div class="section header">MY HEADER</div>
  
<p>or maybe I highlight text <div class="section subparagraph">INSIDE OF THIS P TAG</div> and turn it into a subparagraph.</p>

What and how is the best possible way to make this adjustment?

We are using 2013 Q1 controls, in an ASP.NET C# project.

Respectfully,
Bre
Joana
Telerik team
 answered on 28 May 2013
1 answer
88 views
Hello,

Any one have idea how to localize the RadDock control. 
I want to apply the localization for the Expand/Collapse command in my project, as we have multiple languages on our website.

Thanks.
Dobromir
Telerik team
 answered on 28 May 2013
1 answer
81 views
Hi,

This is not a big issue, but is a little bit irritating...
When clicking an item of a contextmenu, it closes automatically, this is ok for most items.
But when clicking an item that has subitems I didn't expect it to close automatically. Some users has a habit to click to expand even if they don't have to (hover expands)...
Also when clicking on separators it closes, didn't expect that either...

Example:
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <div>
            <telerik:RadContextMenu runat="server" ID="ctx">
                <Targets>
                    <telerik:ContextMenuElementTarget ElementID="test" />
                </Targets>
                <Items>
                    <telerik:RadMenuItem Text="Item 1" />
                    <telerik:RadMenuItem Text="Item 2" />
                    <telerik:RadMenuItem IsSeparator="true" />
                    <telerik:RadMenuItem Text="Item 3" />
                    <telerik:RadMenuItem Text="Item 4">
                        <Items>
                            <telerik:RadMenuItem Text="Item 5" />
                            <telerik:RadMenuItem Text="Item 6" />
                        </Items>
                    </telerik:RadMenuItem>
                </Items>
            </telerik:RadContextMenu>
            <div id="test" style="width: 300px; height: 300px; background-color: red">
                Right click here!
            </div>
        </div>
    </form>
</body>
</html>
I don't think it should close when clicking on "Item 4" or when clicking on the separator!

Regards
Caesar
Boyan Dimitrov
Telerik team
 answered on 28 May 2013
3 answers
146 views
I am looking at your sample on how to Expand/Collapse grouped grid client-side on external control click and I get this to work fine to expand or contract all the groups.

function toggleGroup(e) {
                var tableView=$find('<%=RadGrid1.ClientID %>').get_masterTableView();

                var rows=tableView.get_element().rows;
                for(var i=0,len=tableView.get_element().rows.length;i<len;i++) {
                    var button=tableView._getGroupExpandButton(rows[i]);
                    if(button) {
                        var groupLevel=button.id.split("__")[2];

                        if(groupLevel==0) {
                            tableView._toggleGroupsExpand(button,e);
                        }
                    }
                }
            }

However what I need is to only expand certain groups that the button pertains to. Is there a way to iterate through the group headers and only expand certain ones. I am stumped at finding a way to access the group header text in Javascript.

I am setting the group header text in the ItemDataBound like this
    If TypeOf e.Item Is GridGroupHeaderItem Then
            Dim GroupHeader As GridGroupHeaderItem = DirectCast(e.Item, GridGroupHeaderItem)
            Dim item As GridGroupHeaderItem = DirectCast(e.Item, GridGroupHeaderItem)
            Dim groupDataRow As DataRowView = DirectCast(e.Item.DataItem, DataRowView)
            item.DataCell.Text = groupDataRow.Row.ItemArray(0).ToString()
     End If

Steven
Top achievements
Rank 1
 answered on 28 May 2013
4 answers
104 views


Hi guys,

after  translation your Mega Menu demo C# code in VB.Net   
it doesn't work properly, looks like function   item.Items.Clear()  erases child records in menu,
if I comment that function - child records are kept in menu with wrong alignments,


Best regards
p.s  my source code is below:


Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load


        If Not Page.IsPostBack Then
            RadMenu1.LoadContentFile("Menu.xml")
            RadMenu1.DataBind()
        End If
    End Sub

    Protected Sub RadMenu1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadMenu1.DataBound

        Dim menu As Telerik.Web.UI.RadMenu = CType(sender, Telerik.Web.UI.RadMenu)

        For Each item As Telerik.Web.UI.RadMenuItem In menu.Items
            Dim sm As Telerik.Web.UI.RadSiteMap = New Telerik.Web.UI.RadSiteMap
            PopulateSiteMap(sm, Nothing, item)
            Dim rootLevelSetting As Telerik.Web.UI.SiteMapLevelSetting = New Telerik.Web.UI.SiteMapLevelSetting(0)
            rootLevelSetting.ListLayout.RepeatColumns = 5
            rootLevelSetting.ListLayout.RepeatDirection = Telerik.Web.UI.SiteMapRepeatDirection.Vertical
            sm.LevelSettings.Add(rootLevelSetting)

            item.Items.Clear()

            Dim childItem As Telerik.Web.UI.RadMenuItem = New Telerik.Web.UI.RadMenuItem
            Dim catWrapper As Panel = New Panel
            catWrapper.Width = Unit.Pixel(800)
            catWrapper.Controls.Add(sm)


            If ((Not (item.Attributes("ImagePosition")) Is Nothing) _
            AndAlso (Not (item.Attributes("GroupImageUrl")) Is Nothing)) Then
                Dim img1 As Image = New Image
                img1.ImageUrl = item.Attributes("GroupImageUrl")
                catWrapper.Controls.AddAt(Integer.Parse(item.Attributes("ImagePosition")), img1)
            End If

            childItem.Controls.Add(catWrapper)
            item.Items.Add(childItem)

        Next


    End Sub

    Private Shared Sub PopulateSiteMap(ByVal sm As Telerik.Web.UI.RadSiteMap, ByVal node As Telerik.Web.UI.RadSiteMapNode, ByVal item As Telerik.Web.UI.RadMenuItem)

        If (node Is Nothing) Then
            For Each child As Telerik.Web.UI.RadMenuItem In item.Items
                '' sm.Nodes.Add(New Telerik.Web.UI.RadSiteMapNode(child.Text, child.NavigateUrl))

                node = New Telerik.Web.UI.RadSiteMapNode(child.Text, child.NavigateUrl)
                sm.Nodes.Add(node)
                If (child.Items.Count > 0) Then
                    PopulateSiteMap(sm, node, child)
                End If
            Next
        Else
            For Each child As Telerik.Web.UI.RadMenuItem In item.Items
                node.Nodes.Add(New Telerik.Web.UI.RadSiteMapNode(child.Text, child.NavigateUrl))
                If (child.Items.Count > 0) Then
                    PopulateSiteMap(sm, node, child)
                End If
            Next
        End If

    End Sub
End Class

Kate
Telerik team
 answered on 28 May 2013
1 answer
204 views
Hi,

Do you have any examples of how to set the Image Manager's Upload Path and View Path to point to an Azure container, for the RadEditor control?
I'm coding in ASP.NET 3.5, C#, Web Forms, Visual Studio 2010.

Thank you very much.
Kind regards,
Randy Sullivan
Marin Bratanov
Telerik team
 answered on 28 May 2013
3 answers
73 views
Hi,
In my web page (ASP.Net / VB), I have a RadGrid where I bind data on my BD and all my data is displayed correctly. In my grid, I added in each case (row) an Edit button to change my line.
When I click on my edit button, I call a JS method (client-side) to display my RadWindows.

function openAddPeriodeDialog() {
            var Rad = $find('<%=RadWindowAddPeriode.ClientID%>');
            Rad.show();
}

It displays correctly. In addition, at my edit button, it calls the ItemCommand (server-side) of my RadGrid to make any adjustments.

Dim AnneeFinanciere As String = DirectCast(e.Item, GridDataItem).Item("AnneeFinanciere").Text
txbAnneFianciere.Text = AnneeFinanciere
panelTypePeriode.Visible = False
RadGridIntervalle.DataSource = ObjPeriodeComptableController.GridInsertSelect(AnneeFinanciere)
RadGridIntervalle.Rebind()

My problem is that since my RadWindows is responsible for loading the page, I can not change it's worth, I'm tempted to add at my AjaxManager the method for edit action (ID: ImgEdit in my TemplateColumn) refresh my RadWindows, but it does absolutely nothing happens. 

<telerik:AjaxSetting AjaxControlID="TemplateColumn">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadWindowAddPeriode" />
            </UpdatedControls>
        </telerik:AjaxSetting>


I do not know if you have an idea or suggestion that would allow me to "fix" my problem, but if that is the case, I thank you in advance ;) 

Thank you !
Mathieu

P.S: Sorry for my English low. 


MathieuB
Top achievements
Rank 1
 answered on 28 May 2013
1 answer
129 views
I have this odd error reported from a client. The dialogs in the editor (table designer, link manager etc.) does not have text in the tabs and labels. They are all blank. However, this is only true if you are logged in as a english localized user. As a danish user, you do not have this problem.
I checked to see if theres something wrong with the localization files, but they are all there with correct access rights and all. RadEditor.Dialogs.resx and RadEditor.Dialogs.da.resx have all the same keys. So why does the editor not read from one file but it does from the other?
I tried renaming RadEditor.Dialogs.resx to RadEditor.Dialogs.en.resx, but no change.



Marin Bratanov
Telerik team
 answered on 28 May 2013
3 answers
138 views
Is there a way to allow a user to input the real font size and not constrain them to the values in the drop down? Can the real font size drop down act more like a combobox with custom text allowed?
Marin Bratanov
Telerik team
 answered on 28 May 2013
1 answer
144 views
I have a custom palette I'd like to use for my Rad Chart. The problem is that only one color gets used per bar. I'm assuming this is because I only have one data series. How to get configure the chart to use a different color for each bar?

Here's my current chart configuration:

<telerik:RadChart runat="server" ID="rc1" DefaultType="Bar" DataSourceID="sds1"
               SeriesOrientation="Horizontal" Width="500px" Height="500px">
              <PlotArea>
                 <Appearance Dimensions-AutoSize="false" Dimensions-Width="400px" Dimensions-Height="400px" Dimensions-Margins="50px" FillStyle-MainColor="72, 102, 137" FillStyle-SecondColor="72, 102, 137">
                 </Appearance>
                 <XAxis Appearance-ValueFormat="General" DataLabelsColumn="Company" Visible="True" Appearance-TextAppearance-TextProperties-Color="Black"></XAxis>
                 <YAxis Appearance-TextAppearance-TextProperties-Color="Black"></YAxis>
               </PlotArea>
               <Series>
                <telerik:ChartSeries DataYColumn="Count">
                    <Appearance>
                            <LabelAppearance>
                                <Shadow Blur="0" Distance="0"  Color="Transparent"/>
                            </LabelAppearance>
                        </Appearance>
                </telerik:ChartSeries>
               </Series>
               <Appearance Dimensions-AutoSize="false" Border-Visible="false">
                  <Shadow Blur="5" Distance="3" />
               </Appearance>
                <Legend Visible="false"></Legend>
                <ChartTitle Visible="true" Appearance-Dimensions-AutoSize="false" Appearance-Dimensions-Width="315px" Appearance-Dimensions-Height="40px"
                  Appearance-Dimensions-Margins="0px" Appearance-Dimensions-Paddings="0px" TextBlock-Text="Chart1" Appearance-Position-Auto="false"
                  Appearance-Position-X="5" Appearance-Position-Y="5" Appearance-Shadow-Color="Transparent"></ChartTitle>
             </telerik:RadChart>
Petar Kirov
Telerik team
 answered on 28 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?