System.Data.DataRow BlankRow = ds.Tables[ "Products" ].NewRow( );
BlankRow[ "ProductName" ] = "&alt;font color=\"red\"&agt;add new product&alt;/font&agt;";
ds.Tables[ "Products" ].Rows.InsertAt( BlankRow, 0 );
BlankRow[ "ProductName" ] = "&alt;font color=\"red\"&agt;add new product&alt;/font&agt;";
ds.Tables[ "Products" ].Rows.InsertAt( BlankRow, 0 );
参考:
A Truly Excel-like Grid Controlhttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndive/html/Data02142002.asp?frame=true