Hello,
I'm having an issue with a gridview filter when I use a RadTabControl. What hapens is that when I click a button on a tab, I want to filter the grid that's in the other tab, so when I click that button, I change the selected tab to the one that contains the grid, and execute the filter method (this filter is done using IColumnFilterDescriptor). What happens is that the filter is set on the column but it's not active, and we have to change the filter on the UI (mouse click) of that same column for it to be applied. Bellow is the code sample of my filtering method.
Thanks,
Renato Vale
I'm having an issue with a gridview filter when I use a RadTabControl. What hapens is that when I click a button on a tab, I want to filter the grid that's in the other tab, so when I click that button, I change the selected tab to the one that contains the grid, and execute the filter method (this filter is done using IColumnFilterDescriptor). What happens is that the filter is set on the column but it's not active, and we have to change the filter on the UI (mouse click) of that same column for it to be applied. Bellow is the code sample of my filtering method.
public void Filter()
{
foreach (var c in this.myGrid.Columns)
{
if (c.ColumnFilterDescriptor.IsActive)
{
c.ClearFilters();
}
}
GridViewColumn column = this.myGrid.Columns["ID"];
// Getting it from the property will create it and associate it with its column automatically.
IColumnFilterDescriptor columnDescriptor = column.ColumnFilterDescriptor;
columnDescriptor.SuspendNotifications();
columnDescriptor.FieldFilter.Filter1.Operator = FilterOperator.IsGreaterThanOrEqualTo;
columnDescriptor.FieldFilter.Filter1.Value = 10;
columnDescriptor.ResumeNotifications();
}
Thanks,
Renato Vale