MSWord Example inside a DataForm

5 posts, 0 answers
  1. Carlos
    Carlos avatar
    50 posts
    Member since:
    Feb 2011

    Posted 14 Jun 2011 Link to this post

    MSWord Example inside a DataForm.. with NewItemTemplate, EditTemplate and ReadOnlyTemplate

    First of all, is it possible? Then, is it viable?

    If at least one of above is yes, how?

    How do we treat commands in code behind?

    And if we use MVVM?
  2. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 15 Jun 2011 Link to this post

    Hello Carlos,

    You can place any UI element inside RadDataForm. Customizing what gets displayed in RadDataForm is demonstrated here. We have a RadRichTextBox control which provides many of the features of the MsWord editor and you can place RadRichTextBox inside RadDataForm.

    All of our controls are MVVM compatible so you should not have any problems if you follow the MVVM approach. 


    All the best,
    Milan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Nelson
    Nelson avatar
    62 posts
    Member since:
    Apr 2011

    Posted 15 Jun 2011 Link to this post

    Hi Telerik Team,

    I have the same problem. After put the RitchTextBox inside of DataForm, I want have some events, so I need using commands.

    It´s possible using commands inside of DataFormDataField?
    Like this: 

    <telerik:DataFormDataField Grid.Row="1">
                          
                            <telerik:RadRichTextBoxRibbonUI telerik:StyleManager.Theme="Transparent" Grid.Row="1" Margin="0,100,0,0" ApplicationButtonImageSource="/RichTextBox;component/Images/RichTextBox/MSOffice/AppIcon-telerik.png" Height="207" Grid.RowSpan="2">
                                <telerik:RadRichTextBoxRibbonUI.Resources>
                                    <telerik:FontFamiliesProvider x:Key="FontFamiliesProvider" />
                                </telerik:RadRichTextBoxRibbonUI.Resources>
     
                                <telerik:RadRichTextBoxRibbonUI.ApplicationMenu>
                                    <telerik:ApplicationMenu Height="267">
                                        <telerik:ApplicationMenu.Content>
                                            <StackPanel Width="230" />
                                        </telerik:ApplicationMenu.Content>
                                        <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/open.png" Text="Abrir" Command="{Binding Comando}" />
                                    </telerik:ApplicationMenu>
                                </telerik:RadRichTextBoxRibbonUI.ApplicationMenu>
     
                                 
     
                            </telerik:RadRichTextBoxRibbonUI>
                            <!--<telerik:RadRichTextBox Margin="0"/>-->  
                             

                       
    </telerik:DataFormDataField>

    private ICommand _comando;
            public ICommand Comando
            {
                get { return _comando; }
                set { _comando = value; }
            }
     
     
    //Contrutor I have this:
    _comando = new RelayCommand(Altera) { IsEnabled = true };
    //Where "Altera" is my method for this command




    Thanks in advance.
  5. Nelson
    Nelson avatar
    62 posts
    Member since:
    Apr 2011

    Posted 15 Jun 2011 Link to this post

    Hi,

    I solve the problem with this: Command="{Binding Comando, Source={StaticResource cmd}}", where the cmd is a key of my ViewModel and Comando is my command.
  6. Colin
    Colin avatar
    5 posts
    Member since:
    Dec 2007

    Posted 28 Jun 2011 Link to this post

    Could you give an example of a RadRichtextbox in a raddataform. I am having difficulty binding the data in the source to the radrichtextbox. I can bind to dataformfields no problem but not the radrichtextbox. My dataforms itemsource is set in code behind for a WCF Async. and the radrichtextbox code is

     

     

    <telerik:RadRichTextBox IsReadOnly="True" Grid.Row="3" Grid.Column="2" FontSize="12" DocumentInheritsDefaultStyleSettings="True" Height="Auto" HorizontalAlignment="Left"

     

    HorizontalScrollBarVisibility="Hidden" IsContextMenuEnabled="False" IsSelectionMiniToolBarEnabled="False"

     

    IsSpellCheckingEnabled="True" Name="rtbNoticed"

     

    VerticalScrollBarVisibility="Auto" Width="200" IsEnabled="False">

     

     

    <telerik:RadRichTextBox.Resources>

     

     

    <my1:HtmlDataProvider x:Key="provider" DataContext="{Binding ElementName=radDataForm1,Path=SelectedItem}" RichTextBox="{Binding ElementName=rtbNoticed}" Html="{Binding Noticed, Mode=TwoWay}" />

     

     

    </telerik:RadRichTextBox.Resources>


Back to Top
DevCraft banner