2 posts, 0 answers
  1. Tomasz
    Tomasz avatar
    4 posts
    Member since:
    Dec 2012

    Posted 28 May 2013 Link to this post

     Im using the RadDataForm Control together with the RadGrid Control. They both are based on the same collection of type
     QueryableCollectionView. The objects in the collection are class based objects, the class implements IEditableObject, INotifyPropertyChanged,IDataErrorInfo intrrfaces. My problem is that I want to hide the Commit and the Cancel button but only when
    RadDataForm is in ReadOnlyMode, is this possible do this in other way than implementing my own buttons?
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="Auto" />
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                        <Label Grid.Row="0" Grid.Column="0" Width="40" Content="Key" IsTabStop="False" />
                                        <Label Grid.Row="1" Grid.Column="0" Width="40" Content="Value" IsTabStop="False"/>
                                        <TextBox Grid.Row="0" Grid.Column="1" Width="170" Height="23" Foreground="Black" Text="{Binding Key}" IsTabStop="False"  IsEnabled="False" TextWrapping="Wrap" IsReadOnly="True"  />
                                        <TextBox Grid.Row="1" Grid.Column="1" Width="170" Height="23" Foreground="Black" Text="{Binding Value}" IsTabStop="False" TextWrapping="Wrap" IsEnabled="False" IsReadOnly="True" />

    Also is it possible to scroll to the new added row of the grid when Im adding it using RadDataForms add button ?

  2. Maya
    Maya avatar
    4062 posts

    Posted 31 May 2013 Link to this post

    Hi Tomasz,

    You can try handling BeginningEdit and EditEnded events and set the CommandsButtonsVisibility property to the values you want. For example:

    private void dataForm_BeginningEdit(object sender, System.ComponentModel.CancelEventArgs e)
                this.dataForm.CommandButtonsVisibility = DataFormCommandButtonsVisibility.All;
            private void dataForm_EditEnded(object sender, Telerik.Windows.Controls.Data.DataForm.EditEndedEventArgs e)
                this.dataForm.CommandButtonsVisibility = DataFormCommandButtonsVisibility.Edit;


    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top