Once again, the hidden columns in the gridview of 05 cannot be bound, that is, if a column is set to visible = false, no data binding will be performed, that is to say, the text in this column cannot be obtained directly from the gridview.
I checked the information and found out the support for standard Web 2.0 in the past or 05.
This feature is almost essential in the DataGrid era and is useful for batch selection of lists (such as batch deletion ), hidden columns are usually used to store the values of the key words corresponding to the data record of the row in the DataGrid, but they do not work in the gridview, which is a headache for a large number of people. They also have their solutions online, one of them is as follows. The principle is to set its CSS style to invisible when creating a row, so as to avoid the data not binding problem caused by directly setting column visible = false:
Void Gridviewinclurowcreated (Object sender, gridviewroweventargs E)
{
// Make the index 0 The column is not visible, but is actually generated CSS Code
E. Row. cells [0]. Visible = false;
// Other code if neccecary
}
Another option is to set the style of the bound columns.
(1) set a CSS class:
. Hidden {display: none;} (2) then, in the column editing dialog box of the gridview, set the columns to be hidden and set footstyle, headerstyle, respectively, the cssclass attribute of itemstyle is "hidden"
In this way, the effect is the same as that of the Hidden Column passing value in the DataGrid in 03.