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
1770
Refreshing field layout every time there is a data bind
posted

My data columns are dynamic so they change based on the query parameters. The column number and/or column labels can change. They way I implemented this is by using the FieldLayoutInitialized event in the code behind.

From doing some reading the FieldLayoutInitialized event will not fire if the column types and column number is the same. The problem I'm having is this:

If a user picks calendar year for the query date range and enters in say 2011 to 2012 the column labels are' 2011' and '2012' but if they pick fiscal year the column labels change to '2011/2012' and '2012/2013' but this does not get updated in the xamdatagrid because the FieldLayoutInitialized event does not fire because I'm assuming the number and type of columns are the same as the previous field layout.

Is there a way to force the FieldLayoutInitialized event to fire every time so my field labels get updated?