Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
6349 | Aug 9,2003 02:11 PM UTC | Aug 10,2003 08:15 PM UTC | WinForms | 2 |
![]() |
Tags: GridControl |
public void SetCaptionIntoHeaderText(DataTable dt, GridDataBoundGrid grid) { GridBoundColumnsCollection gbcc = grid.GridBoundColumns; if(gbcc.Count == 0) gbcc = grid.Binder.InternalColumns; if(gbcc.Count > 0) { foreach(GridBoundColumn gbc in gbcc) { DataColumn dc = dt.Columns[gbc.MappingName]; if(dc.Caption.Length > 0 && !dc.Caption.Equals(gbc.HeaderText)) { gbc.HeaderText = dc.Caption; } } grid.RefreshRange(GridRangeInfo.Row(0)); } }
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.