本文介绍了排序radgridview的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个代码可以根据名称(列)过滤数据网格的内容

Hi,
I have a code that filters the content of the datagrid based on the name(column)

private void Filter_Click(object sender, System.Windows.RoutedEventArgs e)
{
    ilterDescriptor filter = new FilterDescriptor("Name", FilterOperator.Contains, (RadGridView1.SelectedItem as Person).Name);
    RadGridView1.FilterDescriptors.Add(filter);
}




我希望根据选定的radgridview上的单元格对其进行过滤.




I want it to be filtered based on the cell on the radgridview that is selected.

Can you help me on this?

推荐答案



private void Filter_Click(object sender, System.Windows.RoutedEventArgs e)
{
    FilterDescriptor filter = new FilterDescriptor(RadGridView1.CurrentCell.Column.UniqueName, FilterOperator.IsEqualTo, RadGridView1.CurrentCell.Value);
    RadGridView1.FilterDescriptors.Add(filter);
}


这篇关于排序radgridview的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 00:04