Cancel PreparingCellForEdit

2 posts, 0 answers
  1. Dennis
    Dennis avatar
    1 posts
    Member since:
    Mar 2013

    Posted 01 Sep Link to this post

    Hi folks,

    i tried to cancel the editation of a ComboBoxColumnCell. But when i set GridViewPreparingCellForEditEventArgs.Cancel to true, the cell gets in edit mode, too.

    Is it a bug or do i have to set another property?




  2. Stefan X1
    Stefan X1 avatar
    523 posts

    Posted 05 Sep Link to this post

    Hello David,

    Depending on your exact requirement, you can choose one of the two following suggestions.

    1. If you need the user to be able to view the items of GridViewComboBoxColumn, but to be unable to select them, you can benefit from the IsEnabled property of RadComboBoxItem. To achieve this, you can define a Style as follows.
    <Style TargetType="telerik:RadComboBoxItem"
        <Setter Property="IsEnabled"
                Value="{Binding IsEnabled}" />

    Then, you can apply this Style to a given column through its EditorStyle property.

    2.   If your requirement is to disable editing of the whole column, you can set its IsReadOnly property to True.

    I hope this helps.

    All the best,
    Stefan X1
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top