Hi people.
I'm implementing PivotGrid on my ASP.NET MVC application. With the Grid component, I was able to make filters based on a selection of which values I want due to bounded columns capture feature.
Is there something like this on PivotGrid?
In Grid component. I've done the filter just like this:
var bounded = gridColumns.Bound(dataTableCol.GetType(), dataTableCol.ToString());
// If the column has a multicheckbox filter - set it based on column definition
var customFilterColumn = Model.columns.SingleOrDefault(item => item.ColumnName.Equals(dataTableCol.ToString()));
if (customFilterColumn != null)
{
bounded.Filterable(ftb => ftb
.Multi(true)
.Cell(cell =>
cell.DataSource(ds =>
// This is the action that will return the filter unique values
ds.Read("MultiFilter_read", "Consulta", new { columnId = customFilterColumn.Id }))));
bounded.Width(300);
}
In "Consulta/MultiFilter_read" action I make a search on database returning the possible values for that column, applying them to the respective bounded column. This instructions I've put on Columns property of the Grid HtmlHelper, and I'm doing PivotGrid with HtmlHelpers too.