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

Disable Cell edit with columns of type GridViewMaskedInputColumn and GridViewComboBoxColumn

1 Answer 299 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 04 Jun 2014, 12:39 PM
Hello,
I need to disable the cell edit based on some properties of my viewmodel.... for standard GridViewDataColumn 

I've done
<telerik:GridViewDataColumn DataMemberBinding="{Binding MULTIPLIER_DA,Mode=TwoWay}" Header="Size da" UniqueName="MULTIPLIER_DA" IsEnabled="{Binding CanUserAdd, RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Grid}}}"  >
                  <telerik:GridViewDataColumn.CellEditTemplate>
                      <DataTemplate>
                          <TextBox Text="{Binding MULTIPLIER_DA,Mode=TwoWay}" IsEnabled="{Binding DataContext.CanUserAdd, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadGridView}}}"></TextBox>
                      </DataTemplate>
                  </telerik:GridViewDataColumn.CellEditTemplate>
              </telerik:GridViewDataColumn>

How do I do it for Combo and Numeric?
Thanks

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 05 Jun 2014, 10:40 AM
Hello,

You can similarly make any column IsEnabled or not. You can also set the IsReadOnly property to disable editing the cells of the column. Would you please clarify how are the Combo and Numeric columns different?

Regards,
Didie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
Michele
Top achievements
Rank 2
Answers by
Dimitrina
Telerik team
Share this question
or