asp.net - Changing the columns titles on a GridView if I set the datasource on codebehind? -
how set gridview category columns titles manually if i'm databinding manually?
namespace workforce { public partial class webform1 : system.web.ui.page { protected void page_load(object sender, eventargs e) { var s = work.datalayer.connection("test"); var x = work.datalayer.getcourselist(s); gridview1.datasource = x; gridview1.databind(); } } }
in design view, there data source id i'm not using.
how this
gridview1.headerrow.cells[0].text = "new header";