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

Disable GridViewDataColumn content placed in Celltemplate

0 Answers 28 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kamran
Top achievements
Rank 2
Iron
Veteran
Iron
Kamran asked on 10 Feb 2012, 08:45 AM
Hi Team,
How I will diable a control placed in GridViewDataColumn cell template programmatically so that content inside CellTemplate become disable.
I need all this functionality when gridview render.

when i use GridViewColumn.IsEnabled= false; It doesn't disable button placed inside DataTemplate.



<telerik:GridViewDataColumn x:Name="clmDelete" Width="30" Header="" HeaderTextAlignment="Center" >
  <telerik:GridViewDataColumn.CellTemplate>
    <DataTemplate>
      <my1:Button x:Name="btnDelete" BorderThickness="0" Background="White"
     Click="btnDelete_Click"  HorizontalAlignment="Left" Grid.Column="0"  Width="20" Height="20">
     <Image Source="/UI.SmartClient;component/~or83E_files/delete16.ico" Width="Auto" />
     </my1:Button>
    </DataTemplate>
 </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn >

foreach (Telerik.Windows.Controls.GridViewColumn column in gv.Columns)
{
       column.isEnabled=false; 
}


No answers yet. Maybe you can help?

Tags
GridView
Asked by
Kamran
Top achievements
Rank 2
Iron
Veteran
Iron
Share this question
or