Sunday, November 16, 2014

To Format Column Names for Rdlc Binding

  /// <summary>
        /// To Format Column Names for Rdlc Binding
        /// </summary>
        /// <param name="reportsTable"></param>
        /// <returns></returns>
        public static DataTable GetDrlcFormattedTableForOTP(DataTable reportsTable)
        {
            try
            {
                foreach (DataColumn column in reportsTable.Columns)
                {
                    if (column.Ordinal < reportsTable.Columns.Count - 15)
                        column.ColumnName = column.Caption = "Field" + (column.Ordinal + 1).ToString();
                }
                return reportsTable;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

No comments:

Using Authorization with Swagger in ASP.NET Core

 Create Solution like below LoginModel.cs using System.ComponentModel.DataAnnotations; namespace UsingAuthorizationWithSwagger.Models {     ...