Hi,
I have a RadGridView that I want to autogenerate columns for, but I also need to add converters to the bindings based on the datatype of the column. I got as far as creating a to attach to the RadGridView.AutoGeneratingColumn event:
private void AutoGeneratingColumn(object sender, GridViewAutoGeneratingColumnEventArgs e){ if (e.ItemPropertyInfo.PropertyType == typeof(DateTimeOffset)) { var col = e.Column; var binding = new Binding() { Converter = new Converters.DateTimeOffsetToLocalDateTimeConverter() }; // How to add the converter to the columns binding?!?! }}
I can't see any way to access the binding of the column to apply the converter. Am I missing something?
Thanks,
Pat