I am building my columns as below, but the caption remains as "MYCOL" as opposed to "My Column", this seems incorrect?
DataColumn dc = new DataColumn("MYCOL", System.String);
dc.Caption = "My Column";
3 Answers, 1 is accepted
answered on 10 Dec 2014, 01:19 PM
With auto-generated columns, RadGrid will use the column's name for the UniqueName and the HeaderText of the generated columns. If you need to use the caption of the columns instead you can handle the server-side OnColumnCreated event, get reference to the DataTable set as a DataSource of the grid, traverse through the columns collection and manually set their caption as a HeaderText of the grid's columns: