I have a simple RadGrid control a web page connecting to a view via a data source. One of the fields requires a special formatting.
I was wondering is there a way to tell the GridBoundColumn to use a particular class when executing the DataFormatString property on the data at Binding Time.
For example, here is an example of data from the view
AccNumber (long), Name (string), OpenDate (datetime)
931367200, Bob Smith, 9-Sep-2010
911405190, Sue Smith, 8-Sep-2009
734412678, Tony Mendica, 3-Jan-2001
What I want the grid to display the fields is as follows:
931 367 200 Smith, Bob 9-Sep-2010
911 405 190 Smith, Sue 8-Sep-2009
734 412 678 L Mendica, Tony 3-Jan-2001
The account for Tony is special as it has long standing customer privileges, so I would like to use a custom formatter class that implements the IFormatProvider interface.
I have considered using the ItemDataBound event and providing the customer format hook in there - however, i would prefer to avoid that if possible.
Thoughts?
j.
I was wondering is there a way to tell the GridBoundColumn to use a particular class when executing the DataFormatString property on the data at Binding Time.
For example, here is an example of data from the view
AccNumber (long), Name (string), OpenDate (datetime)
931367200, Bob Smith, 9-Sep-2010
911405190, Sue Smith, 8-Sep-2009
734412678, Tony Mendica, 3-Jan-2001
What I want the grid to display the fields is as follows:
931 367 200 Smith, Bob 9-Sep-2010
911 405 190 Smith, Sue 8-Sep-2009
734 412 678 L Mendica, Tony 3-Jan-2001
The account for Tony is special as it has long standing customer privileges, so I would like to use a custom formatter class that implements the IFormatProvider interface.
I have considered using the ItemDataBound event and providing the customer format hook in there - however, i would prefer to avoid that if possible.
Thoughts?
j.