I like to answer my question when I can so that future users searching for the stream will find the answer.
I could not find a way to do what I wanted. However, I found that if I define the columns myself, I can change the properties. In this example, I would like to center the column data. Something like that.
BoundField bdfRaisedDate = new BoundField(); clsUtilities.SetBoundFieldCenter(ref bdfRaisedDate, "RaisedDateShort", "Opened", "RaisedDate"); grdIssues.Columns.Add(bdfRaisedDate); grdIssues.DataSource = mdtIssues; grdIssues.DataBind(); public static void SetBoundFieldCenter(ref BoundField bdfAny, string pDataField, string pHeadingValue, string pSortExpression) { bdfAny.DataField = pDataField; bdfAny.HeaderText = pHeadingValue; bdfAny.SortExpression = pSortExpression; bdfAny.HeaderStyle.HorizontalAlign = HorizontalAlign.Center; bdfAny.ItemStyle.HorizontalAlign = HorizontalAlign.Center; }
Bob avallone
source share