using System; using System.Data; using System.IO; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class tootevorm : yldleht { private void Page_Error(object sender, EventArgs e) { Response.Write("vealeht"); } protected void Page_Load(object sender, EventArgs e) { Tooteabi t=new Tooteabi(); //Label1.Text = t.KysiToodeteArv().ToString(); Label1.Text = tervitus(); // throw new Exception("kala"); string[,] andmed=new string[,]{ {"2","3"}, {"5","3"}, {"4","5"} }; int kogus=10; int[] andmed2 = new int[] { 3, 6, 5 }; DataTable dt = new DataTable(); for(int i=1; i<=kogus; i++){ dt.Columns.Add("v"+i.ToString(), typeof(int)); } for (int j = 1; j <= kogus; j++) { DataRow dr = dt.NewRow(); for (int i = 1; i <= kogus; i++) { dr["v" + i.ToString()] = i * j; } dt.Rows.Add(dr); } GridView1.DataSource = dt; GridView1.DataBind(); } protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { GridView1.EditIndex = e.NewEditIndex; } protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { // Response.Write(e.Keys.ToString() + " " + e.RowIndex + " " + e.NewValues.Values[0]); } }