Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
93 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
85 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
167 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
113 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
210 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
78 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
141 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
149 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
149 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
2 answers
170 views
I recently upgraded to 2013 controls from 2010. I have a radcombobox with template content. Previously, if I typed in the search box, it would search company name only. But now it searches all text, even that in the itemtemplate (such as address etc.). It is now slower, and searches text that I am not interested in searching. Can you please tell me how to search only the DataTextField and not the itemTemplate content? Thanks in advance.

<telerik:RadComboBox ID="RadComboBoxGoThroughPublisher" Runat="server"
                                            AllowCustomText="True" AutoPostBack="False" CollapseDelay="0"
                                            DataSourceID="DataSourceAllPublishers" DataTextField="Company"
                                            DataValueField="PublisherID" EnableItemCaching="True" ExpandDelay="0"
                                            Filter="Contains" HighlightTemplatedItems="True" MarkFirstMatch="True"
                                            MaxHeight="300px"
                                            SelectedValue='<%# myHelperObject.helperGetLicenseThroughPublisherID(Eval("LicenseThroughPublisherID")) %>'
                                            TabIndex="8" Width="340px">
                                            <ItemTemplate>
                                                <span>
                                                <hr />
                                                </span>
                                                <asp:Label ID="LabelCompanyShort" runat="server" CssClass="blueHyperlink"
                                                    Text='<%# Eval("CompanyShort") %>'></asp:Label>
                                                <br />
                                                <span>
                                                <asp:Label ID="LabelCompany" runat="server" CssClass="blueHyperlink"
                                                    Text='<%# Eval("Company") %>'></asp:Label>
                                                </span>
                                                <br />
                                                <span>
                                                <asp:Label ID="lblAddress" runat="server" Text='<%# Eval("Address") %>'></asp:Label>
                                                <br />
                                                <asp:Label ID="lblCityStateZip" runat="server"
                                                    Text='<%# myHelperObject.helperGetFormattedCityStateZip(Eval("City"),Eval("State"),Eval("ZipCode"),1,1,0) %>'></asp:Label>
                                                <asp:Panel ID="PanelPartner" runat="server"
                                                    Visible='<%# myHelperObject.helperGetCheckBoxTrueFalse(Eval("Active")) %>'>
                                                    <div style="padding: 3px">
                                                        <span>
                                                        <asp:Label ID="LabelPartner" runat="server" CssClass="mediumBoldDarkAquaHeader"
                                                            Text="Partner"
                                                            Visible='<%# myHelperObject.helperGetCheckBoxTrueFalse(Eval("Active")) %>'></asp:Label>
                                                         <asp:Label ID="LabelPartnerSynch" runat="server"
                                                            CssClass="mediumBoldDarkAquaHeader" Text="- Synch Allowed"
                                                            Visible='<%# myHelperObject.helperGetCheckBoxTrueFalse(Eval("SynchronizationAllowed")) %>'></asp:Label>
                                                        </span>
                                                    </div>
                                                </asp:Panel>
                                                </span>
                                            </ItemTemplate>
                                        </telerik:RadComboBox>
Mark
Top achievements
Rank 1
 answered on 28 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?