For example, the headers 13-1 to 13-11 are also dynamically bound.
Protected void gridview1_rowcreated (Object sender, gridviewroweventargs e) {If (E. row. rowtype = datacontrolrowtype. header) {tablecellcollection tcheader = E. row. cells; // obtain all the units of the row in the table header, tcheader. clear (); // clear the original header information tableheadercell th = NULL; // For (INT I = 1; I <= 10; I ++) {// simulate the creation of 10 sub-columns th = new tableheadercell (); th. TEXT = "scheme_" + I; th. width = 80; tcheader. add (th);} gridviewrow rowheader = new gridviewrow (0, 0, datacontrolrowtype. header, datacontrolrowstate. normal); // create a table header row tableheadercell 22. type = new tableheadercell (); th2.rowspan = 2; th2.text = "date"; th2.width = 100; rowheader. cells. add (2nd); // 2nd = new tableheadercell (); th2.columnspan = 10; th2.text = "Departure plan"; rowheader. cells. add (2nd); // 2nd = new tableheadercell (); th2.rowspan = 2; th2.text = "modify"; rowheader. cells. add (2nd); (gridview) sender ). controls [0]. controls. addat (0, rowheader); // Add to the first row of the gridview, that is, the header }}