This is a migrated thread and some comments may be shown as answers.

MSWord Example inside a DataForm

4 Answers 84 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Carlos
Top achievements
Rank 2
Carlos asked on 14 Jun 2011, 06:22 PM
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?

4 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 15 Jun 2011, 07:26 AM
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
0
Nelson
Top achievements
Rank 1
answered on 15 Jun 2011, 09:56 AM
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.
0
Nelson
Top achievements
Rank 1
answered on 15 Jun 2011, 10:17 AM
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.
0
Colin
Top achievements
Rank 1
answered on 28 Jun 2011, 12:56 PM
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>


Tags
DataForm
Asked by
Carlos
Top achievements
Rank 2
Answers by
Milan
Telerik team
Nelson
Top achievements
Rank 1
Colin
Top achievements
Rank 1
Share this question
or