홈>
레코드 필터링이 허용 된 XamDataGrid가 있습니다. 첫 번째 필드는 "선택"체크 상자이고 나머지는 그리드에 표시 한 개체의 데이터 일뿐입니다. 코드 측면에서 다음과 같습니다.
<igWPF:XamDataGrid x:Name="xamDataGrid"
DataSource="{Binding SomeDataSourceInTheViewModels}">
<!-- XamDataGrid Settings -->
<igWPF:XamDataGrid.FieldLayoutSettings>
<igWPF:FieldLayoutSettings FilterAction="Hide"
FilterUIType="LabelIcons"/>
</igWPF:XamDataGrid.FieldLayoutSettings>
<igWPF:XamDataGrid.FieldSettings>
<igWPF:FieldSettings ...
AllowRecordFiltering="True"
FilterOperatorDefaultValue="Equals"
FilterLabelIconDropDownType="MultiSelectExcelStyle"
.../>
</igWPF:XamDataGrid.FieldSettings>
<!-- XamDataGrid Field layout -->
<igWPF:XamDataGrid.FieldLayouts>
<igWPF:FieldLayout>
<igWPF:Field Label="Selected" Name="Selected" Width="Auto">
<!-- Select/Unselect all button -->
<igWPF:Field.Settings>
<igWPF:FieldSettings AllowEdit="True">
<igWPF:FieldSettings.LabelPresenterStyle>
<Style TargetType="{x:Type igWPF:LabelPresenter}" BasedOn="{StaticResource {x:Type igWPF:LabelPresenter}}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type igWPF:LabelPresenter}">
<!-- The Select all checkbox -->
<CheckBox />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</igWPF:FieldSettings.LabelPresenterStyle>
</igWPF:FieldSettings>
</igWPF:Field.Settings>
</igWPF:Field>
<!-- The rest of the fields -->
<igWPF:Field Label="SomeIntValue" Name="SomeIntValue" Width="Auto"/>
<igWPF:Field Label="SomeBoolValue" Name="SomeBoolValue" Width="Auto" />
<igWPF:Field Label="SomeStringValue" Name="SomeStringValue" Width="Auto" />
</igWPF:FieldLayout>
</igWPF:XamDataGrid.FieldLayouts>
</igWPF:XamDataGrid>
최종 목표는
Selected
위의 데이터 그리드 상단에 확인란을 두는 것입니다.
필터링되지 않은 모든 행을 클릭하고 선택할 수있는 항목입니다. 이것을 구현하는 방법에 대한 새로운 아이디어가 열려 있지만 내 질문은 코드 숨김 또는 ViewModel에서 필터링되지 않은 모든 행을 반복하는 방법은 무엇입니까?
어딘가에 "IsFilteredOut"속성이 있지만
xamDataGrid
에서 찾을 수 없습니다.
-
답변 # 1
관련 질문
- c# - WPF ListView 가로 스크롤 막대는 세로 스크롤이 완료되지 않으면 표시되지 않습니다
- c# - 값에 따라 WPF DataGrid 열의 이미지 변경
- wpf - xaml - c #에서 updatesourcetrigger ="explicit"를 사용하여 텍스트 상자의 사용자 입력을 확인하는 방법은 무엇입니까?
- c# - 자식 요소 내부에 속성을 바인딩하는 방법은 무엇입니까?
- c# - 슬라이더 썸을 끌 수 없습니다
- c# - WPF에서 StackPanel 방향 가로 시작 오른쪽에서 왼쪽으로
- c# - MahApps TabItem의 텍스트 색상을 변경하는 방법
- c# - xaml + awesome - 트리거시 스타일 변경
- c# - (유니버설 windows 앱) systemnullreferenceexception - 개체 참조가 개체의 인스턴스로 설정되지 않았습니다
- revit api wpf c # - 목록 상자의 확인란에 대한 모두 선택 버튼
Recordem의GetFilteredOutDataRecords ()메소드는 레코드 필터 조건을 통과하지 않는 모든 데이터 레코드를 리턴합니다.
도움이됩니다.