Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

Date Format issue in Pivot Grid

$
0
0

Hi Vasil

Below is my Pre_Render function code :

for (int i = 0; i < RadPivotGrid1.Fields.Count; i++)
                {
                    string fieldName = RadPivotGrid1.Fields[i].DataField;
                    if (this.SystemFieldList != null)
                    {
                        SystemFieldView systemFieldList = this.SystemFieldList.FirstOrDefault(q => q.SystemFieldName.Equals(fieldName, StringComparison.OrdinalIgnoreCase));
                        if (systemFieldList != null)
                        {
                            string SystemFieldLabelSearch = systemFieldList.SystemFieldXMLLabelSearch;
                            if (!String.IsNullOrEmpty(SystemFieldLabelSearch))
                            {
                                RadPivotGrid1.Fields[i].Caption = SystemFieldLabelSearch;
                            }
                           
                            //To remove time from datetime

                            foreach (var dateField in this.systemFieldList.Where(q => q.SystemFieldTypeId == 3).Select(q => new { q.SystemFieldName, q.IsTimeDisplayed }).ToArray())
                            {
                                RadPivotGrid1.Fields[i].DataFormatString = "{0:dd.MM.yyyy}";
                            }
                        }
                    }
                }

And I cannot add in markup as these columnare dynamic not static. Attached is my markup code.


Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>