I was wondering is it possible to enforce a datatable expression only on
visible columns of a datagridview.
heres a use case.
End User has a DataGridView populated with upto ten columns of Numbers and a Final Column with a total. if the user decided to hide one of these columns (idealy) the expression would change depending on the the visible columns in the datagrid.
thanks for any input.
You’ll need to handle the DataGridView.ColumnStateChanged Event.
In myDataTable, at first you set no Expression.
After the Grid is loaded for the first time, launch recalculateTotalExpression.