Is there a way to set the DataFormatString in server-side code? I would like to see if it is possible to set the DataFormatString of a specific cell. I see an attribute FormatFieldMethod but dont understand how to set/change it. Thanks.
The FormatFieldMethod takes a delegate of type FormatRecordItemValue. Basically this means that you get to define a method that will be called each time a cell is processed and you will have the opportunity to format the text. Here's an example which just returns "hello" as the formatted text for a column. There's no way to tell what row-index the cell is for, so you'll have to rely on the "value" parameter, and look for the string you want to format. Alternatively, you could add a counter in the "Format" method which you could use to keep track of how many times Format was called - which should be the same as the index of the row ..
The problem is if we go to the 2nd page Page_Load() is not called then we lose these formattings. Or I am missing something?