0
我正在使用Infrgistics XamGrid [InfragisticsWPF4.Controls.Grids.XamGrid.v12.1.dll(12.1.20121.1010)]。我有一種情況,用戶無法過濾只選擇空文本。在選擇非空文本的情況下,過濾器可以正常工作,但包含空文本的任何組合都會排除空行。例如。在下面提供的示例中,如果用戶試圖選擇「PTL_D_IMA」並且爲空文本,則過濾器的結果將變成僅具有「PTL_D_IMA」的一行,而其他具有空文本的兩行不會出現。XamGrid不允許選擇空文本
<ig:XamGrid x:Name="myGrid" ItemsSource="{Binding Source={StaticResource TestDataItems}}">
<ig:XamGrid.FilteringSettings>
<ig:FilteringSettings AllowFiltering="FilterMenu"FilteringScope="ColumnLayout" />
</ig:XamGrid.FilteringSettings>
</ig:XamGrid>
public class TestDataItems
{
private string name;
public string Name
{
get { return name; }
set { name = value; }
}
}
public class TestData : ObservableCollection<TestDataItems>
{
public TestData()
{
Add(new TestDataItems { Name = "PTL_D_IMA"});
Add(new TestDataItems { Name = "PTL_D_PCHCYL"});
Add(new TestDataItems { Name = "PTL_D_ICN"});
Add(new TestDataItems { Name = "PTL_D_PRFI"});
Add(new TestDataItems { Name = "PTL_D_IPH"});
Add(new TestDataItems { Name = ""});
Add(newTestDataItems { Name = string.Empty });
Add(newTestDataItems { Name = "PTL_D_PTCYL"});
Add(new TestDataItems { Name = "PCGM"});
Add(new TestDataItems { Name = "COD_SUS"});
}
}