Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2170
Apply formatting on CellValuePresenter
posted

Hi,

I'm trying to set format on some of the cells (like background color, border...) in the grid. The approach I'm using now is with the following method to retrieve the CVP and set property on it.

CellValuePresenter.FromRecordAndField()

I'm also capturing the scrolling event so that I can refresh the format settings:

ScrollInfo.ScrollOwner.ScrollChanged += new System.Windows.Controls.ScrollChangedEventHandler(ScrollOwner_ScrollChanged);

The problem is when scrolling, CVPs that are supposed to be displayed haven't been generated yet, so the method returns null for the cell I'm asking for.

Please advise whether the approach I'm using is feasible and how to solve this specific issue. Thanks.

btw, I"m dealing with grids of several thousands by several thousands, so having all CVPs generated at loading won't be working. Also the datasource I'm binding to is pretty simple so it's not easy to re-template the CVP and inject binding into it.

 

Cheers,

Daniel

 

 

Parents Reply Children
No Data