c1:C1DataGrid 的标题上的筛选,我试了试,只有纯数字的能筛选成功,列里有字母的就没办法筛选了?是我哪设置的问题吗?
前台代码
<c1:C1DataGrid x:Name="MyGrid" AutoGenerateColumns="False"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
CanUserFreezeColumns="None"
IsReadOnly="True"
RowHeight="25"
AlternatingRowBackground="White"
ScrollMode="Deferred"
GridLinesVisibility="All"
SelectionMode="MultiRange"
ColumnHeaderClickAction="Select"
>
<c1:C1RowIndexHeaderBehavior.RowIndexHeaderBehavior>
<c1:C1RowIndexHeaderBehavior InitialIndex="1"/>
</c1:C1RowIndexHeaderBehavior.RowIndexHeaderBehavior>
<c1:C1DataGrid.Columns>
<c1ataGridTextColumn Binding="{Binding Path=ID}" Width="60" FilterMemberPath="ID" SortMemberPath="ID" Header="ID" />
<c1ataGridTextColumn Binding="{Binding OrderNo}" Width="105" FilterMemberPath="订单号" SortMemberPath="订单号" Header="订单号" />
<c1ataGridTextColumn Binding="{Binding ProdID}" Width="120" FilterMemberPath="物料编码" SortMemberPath="物料编码" Header="物料编码" />
<c1ataGridTextColumn Binding="{Binding SlbNo}" Width="100" FilterMemberPath="SlbNo" SortMemberPath="SlbNo" Header="SlbNo" />
<c1ataGridTextColumn Binding="{Binding OperaterType_Name}" Width="80" FilterMemberPath="检验类型" SortMemberPath="检验类型" Header="检验类型" />
<c1ataGridTextColumn Binding="{Binding Frequency_Name}" Width="77" FilterMemberPath="检验过程" SortMemberPath="检验过程" Header="检验过程" />
<c1ataGridTextColumn Binding="{Binding SemiProduct_SerNo}" Width="90" FilterMemberPath="订单唯一码" SortMemberPath="订单唯一码" Header="订单唯一码" />
<c1ataGridTextColumn Binding="{Binding prdPerson}" Width="70" FilterMemberPath="工号" SortMemberPath="工号" Header="工号" />
<c1ataGridTextColumn Binding="{Binding PersonName}" Width="100" FilterMemberPath="检验人" SortMemberPath="检验人" Header="检验人" />
<c1ataGridTextColumn Binding="{Binding Note}" Width="100" FilterMemberPath="备注" SortMemberPath="备注" Header="备注" />
<c1:DataGridTextColumn Binding="{Binding Recorddate}" Width="100" FilterMemberPath="检验时间" SortMemberPath="检验时间" Header="检验时间" />
<c1:DataGridTextColumn Binding="{Binding ProcessName}" Width="100" FilterMemberPath="工序" SortMemberPath="工序" Header="工序" />
<c1:DataGridTextColumn Binding="{Binding ObjectID}" Width="100" FilterMemberPath="料号" SortMemberPath="料号" Header="料号" />
</c1:C1DataGrid.Columns>
</c1:C1DataGrid>
后台代码
TestDal dal = new TestDal();
DataTable dt = dal.GetCheck_RecordsetMain_Pad(tb_Serno.Text, tb_PersonID.Text,(DateTime) StartDate.DateTime, (DateTime)EndDate.DateTime);
MyGrid.ItemsSource = dt.DefaultView; |