Hi guys,
I'm facing a problem that I haven't been able to match in any of available examples on your website and forum.
I have a data store that is being generated from the XML in order to be able to have dynamic column names, formatting and so on. Everything is working fine so far the only thing I'm not able to achieve is to attach dynamically based on column name or id a CustomSortType.
I've tried doing the following:

                
                XmlDataSource1.Update();                
                XmlDataSource1.DataBind();
                mainStore.DataBind();


                foreach (var currentField in mainStore.Reader[0].Fields)
                {
                    if (currentField.Name.Contains("Cost_Status"))
                        currentField.CustomSortType.Fn = "sortingRAG";
                }
but it doesn't work I still get a column with normal sorting. Any ideas on how to make it work?

Thanks