Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
177 views
I have a spell checker that I am trying to localize (both the UI and the dictionary language).  It's being called from a Silverlight application using Javascript.  That part works fine.  However, it never takes any of the language parameters I set; it always displays in English.

Here is the Javascript:

    <div>
<telerik:RadSpell ID="RadSpell1" runat="server" ClientTextSource="_variableSpellSource" ButtonType="None" Overlay="true"
    IsClientID="True" OnClientDialogClosed="spellingfinished"
    SupportedLanguages="en-US,English,fr-FR,French" />
    </div>
<script type="text/javascript">
    // Called from silverlight to check text from Silverlight
    function CheckSpelling(text, lang) {
        _variableSpellSource.set_text(text);
        var rs = GetRadSpell('<%= RadSpell1.ClientID %>');
        rs.Language = lang;
        rs.DictionaryLanguage = lang;
        rs.startSpellCheck();
    }
 
    // Calls silverlight back when spell check is done
    function spellingfinished(sender, e) {
        document.getElementById("silverlightControl").Content.Page.SpellCheckDone(_variableSpellSource.get_text());
        _variableSpellSource.set_text("");
    }
 
    var _variableSpellSource = new VariableSpellSource(); //object used in custom spell method (so I dont have to put text into a DOM object)
    var _defaultPageSpellText = ""; // The text to spell check
     
    // Class to allow custom spelling source
    function VariableSpellSource() {
        this.get_text = function() {
        return _defaultPageSpellText;
        }
 
        this.set_text = function(newValue) {
        _defaultPageSpellText = newValue;
        }
    }
</script>

I'm not sure what to do.  I even set Language and DictionaryLanguage hard-coded to "fr-FR" in the <telerik:RadSpell> object and it still shows in English.  Do I have something set up wrong elsewhere?  I have in my App_Data directory a RadSpell folder which contains de-DE.tdf, en-US.tdf, and fr-FR.tdf.
Lini
Telerik team
 answered on 21 Jan 2011
2 answers
180 views
The radbutton does not support the onclientclick property as outlined below:

<asp:Button ID="Button1" runat="server" CausesValidation="False" 
     CommandName="Delete" Text="Delete"                                    
     OnClientClick="return confirm('Are you certain you want to delete this Customer?')" 
     BackColor="#3333CC" Font-Bold="True" Font-Names="Arial" Font-Size="X-Small" 
     ForeColor="White" />
 <telerik:RadButton ID="RadButton6" runat="server" CausesValidation="False" 
     CommandName="Delete" Text="Delete" Skin="Web20"
     OnClientClick="return confirm('Are you certain you want to delete this Customer?')">
</telerik:RadButton>

The ASP button will present a delete confirmation in a formview. The telerik button will not. Is there a way to get this to work with the Telerik button?

Regards, Lee
Lee
Top achievements
Rank 1
 answered on 21 Jan 2011
1 answer
45 views
Hi,
I have a question for RadGrid. I have a radgrid that allows paging, grouping and filtering. When I group the grid by any field column, i want RadGrid shows the grouping headers as item rows. I mean, if the pager allows 10 items per radgrid page, after grouping radgrid page should contains 10 grouping headers. Is there any posibility to do that?
Thanks..
Iana Tsolova
Telerik team
 answered on 21 Jan 2011
1 answer
120 views

Hi Team,

                 I have a Telerik grid in my application like figure 1. I would like to add a link button(Edit) on every visible header column as Figure 2. When I click the Edit button, it has to allow the user to edit the header text, and it has to allow to update the edited header. see figure 3.

Figure 1:

Name             

Age                

Country         

City                

Jogn

25

USA

CA

Micheal

28

USA

NY

Marie

23

USA

LA

Figure 2:

Name             Edit

Age                 Edit

Country          Edit

City                 Edit

Jogn

25

USA

CA

Micheal

28

USA

NY

Marie

23

USA

LA

Figure 3:

First Name

 
                  update cancel

Age                 Edit

Country          Edit

City                 Edit

Jogn

25

USA

CA

Micheal

28

USA

NY

Marie

23

USA

LA

The box which holds the “First Name” text is a TextBox.


Please send me a solution as soon as possible.

Thanks

Alexis



Iana Tsolova
Telerik team
 answered on 21 Jan 2011
1 answer
103 views
I have a datalist with custom paging thats inside a RADAjaxPanel in a usercontrol.  When I select pages in Firefox, the ajax functionality works fine (there is no full page postback), however, the same page in IE8 & Chrome generates a full page postback.  Anyone know why this should be ?  are there extra steps to take when using IE & Chrome ?

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"
        Width="75px">
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'
            style="border: 0px;" />
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="100%"
        EnablePageHeadUpdate="False" HorizontalAlign="NotSet"
        LoadingPanelID="RadAjaxLoadingPanel1" >
                
        <div class="ArtistQueryItemrow">
        
               
        </div>
         
    <div class="ArtistQueryItemrow">   
    <h1><asp:Literal ID="LiteralQueryMessage" runat="server" Visible="False"></asp:Literal></h1>
    <asp:DataList ID="DataListBloggQuery" runat="server" RepeatLayout="Table"
            onitemdatabound="DataListBloggQuery_ItemDataBound" Width="100%"
            RepeatColumns="1">
         
        <ItemTemplate>
            <div id="profile_listing">
                   <div class="description">
                    
                   <h1> <asp:Label ID="LabelBloggDate" runat="server"  AssociatedControlID="LiteralBlogg"></asp:Label></h1>
                   <p><asp:Literal ID="LiteralBlogg" runat="server" ></asp:Literal></p>
                                    
                   </div>  
                                      
                    
                    
            </div>
        </ItemTemplate>
         
    </asp:DataList>
    </div>
    
    </telerik:RadAjaxPanel>
Maria Ilieva
Telerik team
 answered on 21 Jan 2011
2 answers
81 views
Hello,

Using the RadMenu client-side API (http://demos.telerik.com/aspnet-ajax/menu/examples/programming/clientsideapi/defaultcs.aspx) is it possible to open a RadMenuItem when a page loads?

Thanks,

Matt
Matt
Top achievements
Rank 1
 answered on 21 Jan 2011
3 answers
84 views

Hello,

I created a RadToolBar with version Q2 2008 and everything look great. I'm now upgrading our site to use version Q3 2010, and my RadToolBar now looks ugly. There are three main faults. (See attached screen shots)
1. A white bar has appeared when a button or drop down menu is highlighted.
2. Buttons that belong to a drop down do not show there images fully.
3. Buttons that belong to a drop down are highlighted in bars.

I've created a test site with a RadToolBar. I can change my reference of Telerik.Web.UI.dll from Q2 2008 to Q3 2010 to experience the differences quickly, which looks like:

 

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
  
<%@ 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 id="Head1" runat="server">
    <title>Toolbar Test</title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="ScriptManager1" runat="server" />
          
        <telerik:RadToolBar runat="server" id="MyBar" Orientation="Vertical"  >
            <Items>
                <telerik:RadToolBarDropDown runat="server" ImageUrl="~/Images/NewReceipt.jpg" 
                    Text="DropDown 0">
                    <Buttons>
                        <telerik:RadToolBarButton runat="server" 
                            ImageUrl="~/Images/ReceiptInternal.jpg" Text="Child Button 1" Height="58px">
                        </telerik:RadToolBarButton>
                        <telerik:RadToolBarButton runat="server" 
                            ImageUrl="~/Images/ReceiptExternal.jpg" Text="Child Button 2" Height="58px">
                        </telerik:RadToolBarButton>
                    </Buttons>
                </telerik:RadToolBarDropDown>
            </Items>
        </telerik:RadToolBar>    
    </form>
</body>
</html>

Can anyone help me to fix these faults?

 

Thanks,

Matt

Matt
Top achievements
Rank 1
 answered on 21 Jan 2011
1 answer
112 views
Hi all,

I have been using Telerik's tutorials on how to dynamically add docks to a dock zone. Inside of my dock is a chart which has drill-down capability. I do not seem to be doing something correctly, however. When the user interacts with the chart (it seems) that some of the dock's initially set properties are being forgotten.

Image: http://i.imgur.com/3Qrqn.png

The upper image is a freshly created dock zone. The second image is moments after the user clicked a series on the chart and 'drilled down.' I placed breakpoints throughout my code and it seems that the upper bar is disappearing before Page_Init is called.

In addition, if the user refreshes the page or grabs the dock and drags it, then allows it to drop back onto the dock zone, it resets to its initial state. The title bar becomes present again.

Here is the relevant code I have written:

protected void RadListBox_Dropped(object sender, RadListBoxDroppedEventArgs e)
{
    foreach( RadListBoxItem item in e.SourceDragItems)
    {
        RadDock dock = CreateRadDock();
        dock.Tag = item.Text;
        dock.Title = dock.Tag + CurrentDockStates.Count.ToString();
        RadDockZone1.Controls.Add(dock);
        CreateSaveStateTrigger(dock);
         
        LoadContent(dock);
    }
}

private RadDock CreateRadDock()
{
    RadDock dock = new RadDock();
    dock.DockMode = DockMode.Docked;
    dock.UniqueName = Guid.NewGuid().ToString().Replace("-", "a"); //Why am I replacing with 'a' here?
    dock.ID = string.Format("RadDock{0}", dock.UniqueName);
    dock.Title = "Dock";
    dock.Skin = RadDockLayout1.Skin;
    dock.Width = Unit.Pixel(200);
    dock.EnableRoundedCorners = true;
 
    return dock;
}

private void CreateSaveStateTrigger(RadDock dock)
{
    dock.AutoPostBack = true;
    dock.CommandsAutoPostBack = true;
 
    AsyncPostBackTrigger saveStateTrigger = new AsyncPostBackTrigger();
    saveStateTrigger.ControlID = dock.ID;
    saveStateTrigger.EventName = "DockPositionChanged";
    UpdatePanel1.Triggers.Add(saveStateTrigger);
 
    saveStateTrigger = new AsyncPostBackTrigger();
    saveStateTrigger.ControlID = dock.ID;
    saveStateTrigger.EventName = "Command";
    UpdatePanel1.Triggers.Add(saveStateTrigger);
}

private void LoadContent(RadDock dock)
{
    switch (dock.Tag)
    {
        case "Cat 5e Capacity":
            System.Web.UI.Control ctrl = Page.LoadControl("PowerUsage.ascx");
            dock.ContentContainer.Controls.Add(ctrl);
            break;
    }
}

RadDockLayout1_SaveDockLayout, LoadDockLayout, CurrentDockStates, CreateRadDockFromState are identical to those given in your examples. I believe the above should all be mostly identical, if not identical, as well. 

The only difference I can see between my example and http://demos.telerik.com/aspnet-ajax/dock/examples/myportal/defaultcs.aspx is that my example does not use a 2nd UpdatePanel. Instead, I am using the RadAjaxManager to refresh the view after a user has drag/dropped/created a dock. 

Does this seem correct? Can I provide more information?

Sean

EDIT: I see why the state of the graph reverts to its top level view. During page_init all the docks call LoadContent again to, in theory, reload the content they were displaying before. In practice, a user has navigated one level deep into the chart and then LoadContent is called -- this retrieves the top level of the chart, not one level deep. Any advice on how to handle this scenario would be much appreciated -- I do not see a great way of handling this.
Pero
Telerik team
 answered on 21 Jan 2011
2 answers
173 views
If I have created a multicolumn radcombobox, how do I access the secondary selected column values in the code behind?  I can't locate an example of this.

Thanks,
JC

John Cooney
Top achievements
Rank 1
 answered on 21 Jan 2011
5 answers
943 views
Hi,

I have a radGrid to which I add GridHyperlinkColumn at runtime. I need to pass Navigation urls to these which depends on the values of the other cells.

GridHyperLinkColumn column = (GridHyperLinkColumn)gridBoundColumns[j];
column.DataTextField = gridField.DataField;
column.HeaderText = gridField.HeaderText;
column.NavigateUrl = "accountview.aspx?id=<%# Eval(\"AccountID\") %>";

If I pass the NavigateUrl value as above it is taking as a string but not replacing Eval("AccountID") to the value in that cell.
How to achieve this functionality like this???

Thanks,
Mahesh





Iana Tsolova
Telerik team
 answered on 21 Jan 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?