Wednesday, May 19, 2010

Create Dynamic DataTable with DataTableManager

static DataTable dtNew;




string[] colNames = { "StudentID", "Name", "Course", "StudentClass", "MobileNo", "HomeEmail", "PT" };


string[] colTypes = { "System.String", "System.String", "System.String", "System.String", "System.String",
                                 "System.String", "System.String"};


int[] colWidth = { 10, 10, 10, 10, 10, 10, 10 };


protected void Page_Load(object sender, EventArgs e)
{
      if (!Page.IsPostBack)
          dtNew = DataTableManager.createNewTable(colNames, colTypes);
}

No comments: