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

[Solved] GridViewDataColumn IsReadOnly properties binding to GridViewCheckBoxColumn

2 Answers 285 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jara
Top achievements
Rank 1
Jara asked on 30 Dec 2010, 12:15 PM
Hi,
In application I have GridView, which contains some columns

 

 

 

<telerik:GridViewDataColumn DataMemberBinding="{Binding RowNumber}" Header="" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding RowName}" Header="Turtas" Width="*" />
<telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding IsCalculatedByFormula}" Header="" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding CalculationFormula}" Header="Formule" Width="100" IsReadOnly="{Binding IsCalculatedByFormula}" />

 


I want to do this,
For example, if is selected GridViewCheckBoxColumn, when the last GridViewDataColumn property IsReadOnly set to true, and if not selected, when property IsReadOnly set to false. (If checkbox is selected, I can edit GridViewdataColumn, if not selected, can't edit)
Maybe somebody know, how can I do it?

Thanks,
Jara


2 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 30 Dec 2010, 12:31 PM
Hello Jara,

The best possible approach would be to use the IsReadOnlyBinding property of the column instead of the IsReadOnly. In your particular case it would be:

<telerik:GridViewDataColumn DataMemberBinding="{Binding CalculationFormula}" Header="Formule" Width="100" IsReadOnlyBinding="{Binding IsCalculatedByFormula}" />

 

All the best,
Maya
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Jara
Top achievements
Rank 1
answered on 11 Jan 2011, 12:41 PM
Thanks for reply

Jara
Tags
GridView
Asked by
Jara
Top achievements
Rank 1
Answers by
Maya
Telerik team
Jara
Top achievements
Rank 1
Share this question
or