Y
yogarajan.ganesan
hello friend
am new in asp.net
i have one doubt pls help me
page load:
DataSet ds = BuildDataSet();
DataGrid1.DataSource = ds;
DataGrid1.DataBind();
private DataSet BuildDataSet()
{
DataSet ret = new DataSet();
DataTable dt = new DataTable();
DataRow dr = null;
// Define table column names and datatypes
DataColumn dc = new DataColumn("ID",Type.GetType("System.Int32"));
dt.Columns.Add(dc);
dc = new DataColumn("Name",Type.GetType("System.String"));
dt.Columns.Add(dc);
dc = new DataColumn("Date",Type.GetType("System.DateTime"));
dt.Columns.Add(dc);
// Fill the table with sample data
for(int i = 1;i < = 10;i++)
{
dr = dt.NewRow();
dr["ID"] = i;
dr["Name"] = "John Smith";
dr["Date"] = DateTime.Now.AddSeconds(i * 10);
dt.Rows.Add(dr);
}
// Return the dataset to the caller
ret.Tables.Add(dt);
return ret;
}
current output
ID Name date
1 johnsmith
..
....
i need one more link colum
how can i add
i want out put looks like this
ID Name Date link
1 john smith 1/1/2007 hyperlink (link go to my another page b.aspx)
pls help me it is very urgent
am new in asp.net
i have one doubt pls help me
page load:
DataSet ds = BuildDataSet();
DataGrid1.DataSource = ds;
DataGrid1.DataBind();
private DataSet BuildDataSet()
{
DataSet ret = new DataSet();
DataTable dt = new DataTable();
DataRow dr = null;
// Define table column names and datatypes
DataColumn dc = new DataColumn("ID",Type.GetType("System.Int32"));
dt.Columns.Add(dc);
dc = new DataColumn("Name",Type.GetType("System.String"));
dt.Columns.Add(dc);
dc = new DataColumn("Date",Type.GetType("System.DateTime"));
dt.Columns.Add(dc);
// Fill the table with sample data
for(int i = 1;i < = 10;i++)
{
dr = dt.NewRow();
dr["ID"] = i;
dr["Name"] = "John Smith";
dr["Date"] = DateTime.Now.AddSeconds(i * 10);
dt.Rows.Add(dr);
}
// Return the dataset to the caller
ret.Tables.Add(dt);
return ret;
}
current output
ID Name date
1 johnsmith
..
....
i need one more link colum
how can i add
i want out put looks like this
ID Name Date link
1 john smith 1/1/2007 hyperlink (link go to my another page b.aspx)
pls help me it is very urgent