Dynamically create a column code

xiaoxiao2021-03-06  37

private void Page_Load (object sender, System.EventArgs e) {AuditUserManager aum = new AuditUserManager (); DataTable dt = aum.getAllUser (); DataColumn dc = new DataColumn ( "shenpi", typeof (String)); dt.Columns. Add (DC); for (int i = 0; i

} This.DataGrid1.datasource = dt;

THIS.DATAGRID1.DATABIND (); // put user code to initialize the point}

In SELECT, use SQL to create a select *, via = case grade when> = 60 Then 'via' When <60 Ten 'does not pass' end from ... If required to transparently, you can create a table, Dynamic creation of a judgment field

Create Table [DBO]. [Flower Mopy] (... through the AS Case Score when> = 60 Then 'Did' end "end)

转载请注明原文地址:https://www.9cbs.com/read-64662.html

New Post(0)