RadDropDownButton with TableSizePicker

5 posts, 0 answers
  1. Sodi We
    Sodi We avatar
    160 posts
    Member since:
    Apr 2010

    Posted 28 Jan 2011 Link to this post

    Hello,

    I'm using a RadDropDownButton that contains a TableSizePicker. I would like the dropdown to collapse automatically when the user clicks on the TableSizePicker. Setting the 'KeepOpen' property of the RadDropDownButton to false didn't work. Any ideas?

    Here is a code snippet. The element name 'richTextEditor' refers to a RadRichTextBox
    <telerik:RadDropDownButton x:Name="btnTable" DataContext="{Binding Commands, ElementName=richTextEditor}" Command="{Binding Path=InsertTableCommand}" KeepOpen="False" >
         <Image Source="..." Style="..." ToolTipService.ToolTip="..."/>
         <telerik:RadDropDownButton.DropDownContent>
             <telerik:RadButton ClickMode="Press">
                 <telerik:TableSizePicker DataContext="{Binding Commands, ElementName=richTextEditor}" Command="{Binding Path=InsertTableCommand}" />
             </telerik:RadButton>
         </telerik:RadDropDownButton.DropDownContent>
    </telerik:RadDropDownButton>

    I also would like to apply localization on the TableSizePicker. This control currently contains text like 'Insert Table' and 'a x b Table' (where a and b are the number of columns and rows selected by the user in the TableSizePicker). I would like to replace 'Insert Table' and the word Table in 'a x b Table' by my own translations. Is this possible?

    Thanks
    Sodi
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 02 Feb 2011 Link to this post

    Hi Sodi We,

    By design, the TableSizePicker should be used with RadRibbonDropDownButton like so:
    <telerik:RadRibbonDropDownButton  Width="120" Height="40" Background="Aqua"  >
        <telerik:RadRibbonDropDownButton.DropDownContent>
        <telerik:RadRibbonButton >
            <telerik:TableSizePicker  />
                </telerik:RadRibbonButton>
        </telerik:RadRibbonDropDownButton.DropDownContent>
    </telerik:RadRibbonDropDownButton>
    This way you will have the desired behavior of the button.
    On the other hand the localization feature is  scheduled for Q1 2011.
    Feel free to ask if you need further info.

    Regards,
    Petar Mladenov
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
  4. Sodi We
    Sodi We avatar
    160 posts
    Member since:
    Apr 2010

    Posted 14 Feb 2011 Link to this post

    Hello Petar,

    This works. Thanks!

    Regards,
    Sodi
  5. Sodi We
    Sodi We avatar
    160 posts
    Member since:
    Apr 2010

    Posted 30 Mar 2011 Link to this post

    Hello Petar,

    I installed version 2011.1.315.1040 of the Telerik controls. Is the localization feature for the TableSizePicker control included in this version? If yes,  how can I replace 'Insert Table' and the word Table in 'a x b Table' by my own translations? (a and b are the number of columns and rows selected by the user in the TableSizePicker)

    Thanks
    Sodi


  6. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 01 Apr 2011 Link to this post

    Hi Sodi We,
    Localization is now supported on the TableSizePicker and all string that the rich text box uses.
    You can refer to this forum thread for some information on localization in general and the default resource file.
    There is also a small demo here (it is for WPF, but the resource files and the approach are pretty much the same).
    The strings you would need to localize are:
    • Documents_TableSizePicker_InsertTable
    • Documents_TableSizePicker_TableSize
    If you are using the table size picker in conjunction with a button that opens the InsertTableDialog
    (like in the MS Word demo), you might also need to localize the strings in the InsertTableDialog:
    • Documents_InsertTableDialog_Header
    • Documents_InsertTableDialog_NumberMustBeBetween
    • Documents_InsertTableDialog_NumberOfColumns
    • Documents_InsertTableDialog_NumberOfRows
    • Documents_InsertTableDialog_TableSize
    • Cancel
    • Ok

    Best wishes,
    Iva
    the Telerik team
Back to Top
DevCraft banner