Hi All ,
Wanted to know ...are there any grid property available, which tells whether grid has, any filters applied or not and check if any group by columns applied...?
Many Thanks
For GroupBy, I think you need to loop through all of the Bands. Check the SortedColumns collection on each band. Loop through the columns in the collection and check IsGroupBy on each one. If any one returns true, then there is grouping.
Thanks Mike...i will be try out ..on this thanks
Hi Mike here i have one more doubt .that...how to check if filter row has conditioned applied..?
UltraGridFilterRow filterRow = MyUltraGrid.Rows.FilterRow;
if (!ucells.Text.Equals(string.Empty)) filterCellHasValue =
filterCellHasValue =
true;
}
Currently i am checking as above is it a right way to validate..?
It doesn't matter whether you are using the FilterRow or not. If you want to know if there is a filter applied to a particular column, you would check something like this:
foreach (UltraGridColumn column in band.Columns)
{
if (band.ColumnFilters[column].FilterConditions.Count > 0)
columnIsFiltered = true;
There is a property that is exactly doing it, how to access it?
ColumnFilters.IsAnyColumnFilterActive
That property is internal. If you are asking how to access internal properties, then you can do this using reflection, if your application has full trust. But that's generally not recommended unless you have no other option.
If that's what you want to do, I recommend checking out Microsoft's documentation on how to use reflection to access internal properties. There are plenty of articles on this on StackOverflow, as well.