using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class GameScheduleEdit : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { System.Data.DataSet myDataSet = new System.Data.DataSet(); myDataSet.ReadXml(Server.MapPath("GameSchedule.xml")); if (!IsPostBack) { BindDDL1(myDataSet); } BindGV1(myDataSet); // Presuming the DataTable has a column named Date. //string expression = "Date > #1/1/00#"; //System.Data.DataRow[] foundRows; // Use the Select method to find all rows matching the filter. //foundRows = table.Select(expression); } protected void BindDDL1(System.Data.DataSet myDataSet) { System.Data.DataTable division = myDataSet.Tables["division"]; DropDownList1.DataSource = division; DropDownList1.DataTextField = division.Columns["title"].ToString(); DropDownList1.DataValueField = division.Columns["division_Id"].ToString(); DropDownList1.AutoPostBack = true; DropDownList1.SelectedValue = "0"; DropDownList1.DataBind(); } protected void BindGV1(System.Data.DataSet myDataSet) { string expression = "division_Id = '0'"; System.Data.DataRow[] result = myDataSet.Tables["game"].Select(expression); System.Data.DataTable myTable = new System.Data.DataTable(); foreach (System.Data.DataRow row in result) { System.Data.DataRow newRow = myTable.NewRow(); for (int i=0;i