-1
我想隱藏兩個檢查框中的colomn,我使用telerk radgrid控件。網格包含五個colomn ID,FName參數,LName的,MobileNo,分支。當複選框上要隱藏ID和姓名colomn請給暗示了,我的代碼如下檢查點擊複選框隱藏多行
C#代碼: 類MainWindowViewModel {
public MainWindowViewModel()
{
EmpList = ListOfEmpInfo();
}
private ObservableCollection<EmpInfo> ListOfEmpInfo()
{
return new ObservableCollection<EmpInfo>()
{
new EmpInfo(){ ID=1, City ="Pune" , FirstName ="Rahul" , LasttName ="Rathod", MobileNumber =123},
new EmpInfo(){ ID=2, City ="Mumbai" , FirstName ="Mahesh" , LasttName ="Yogaa", MobileNumber =456},
new EmpInfo(){ID=3, City ="Jalna" , FirstName ="Ganesh" , LasttName ="Kapadia", MobileNumber =178923}
};
}
public ObservableCollection<EmpInfo> EmpList
{
get;
set;
}
}
<Grid Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="500"/>
<ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions>
<CheckBox Content="Hide Show" IsChecked="{Binding IsVisible}" Height="40" Grid.Column="2"></CheckBox>
<telerik:RadGridView x:Name="radGridView" ItemsSource="{Binding EmpList}"
Grid.Column="1"
Margin="10,0,0,0" />
</Grid>
你嘗試過什麼來實現你的目標是什麼?你到底有什麼問題? – mittmemo
檢查複選框時,我想隱藏radgridview的ID和名稱colomns –
我明白你想要做什麼。你有什麼嘗試? – mittmemo