Posted 4 March 2020, 4:23 am EST
Good morning,
is it possibile activate autosearch on specific columns ?
Thanks in advance
Massimo
Forums Home / ComponentOne / General Discussion
Posted by: massimo.valtolina on 4 March 2020, 4:23 am EST
Posted 4 March 2020, 4:23 am EST
Good morning,
is it possibile activate autosearch on specific columns ?
Thanks in advance
Massimo
Posted 4 March 2020, 5:35 pm EST
Hello,
As per our understanding, you are using C1FlexGrid with AutoSearch property and there is no AutoSearch property at Column level so you need to handle it through BeforeRowColChange event to achieve the desired result as given in code snippet below:
private void C1FlexGrid1_BeforeRowColChange(object sender, C1.Win.C1FlexGrid.RangeEventArgs e)
{
if(e.NewRange.c1 == SpecificColumnIndex)
{
c1FlexGrid1.AutoSearch = C1.Win.C1FlexGrid.AutoSearchEnum.FromTop;
}
else
{
c1FlexGrid1.AutoSearch = C1.Win.C1FlexGrid.AutoSearchEnum.None;
}
}
Please go through the attached sample implementing the same.
If you are using any other control then please let us know.
Regards,
Prabhat Sharma.
AutoSearchDemo.zip
Posted 6 March 2020, 2:12 am EST
Thanks a lot !