Seems like a very specific task. You might have to code it yourself. You'll want to use the <ItemTemplate> (i think thats what its called) and just create your own href like this... <a href='<%#String.Format("event.aspx?id={0}", DataBinder.Eval(Container.DataItem, "ID"))%>' target="_blank">click me</a> note: check my syntax, I just typed this off hand. Joel Thoms DiscountASP.NET http://www.DiscountASP.NET
Hello, I'm a new learner... I'd like to know there's any sourcecode that i can use to let the selected column in Grid View to openanother page with the Detail View.. Thanks...
Create instances of the following objects:</o> </o> SqlConnection à SqlCommand à SqlDataAdapter à DataSet </o> </o> GridView</o> </o> Add a Select command field to the GridView1.</o> </o> Assume: sqlConnection1, sqlCommand1, sqlDataAdapter1, dataSet1, GridView1</o> </o> Initialize the sqlCommand1.CommandText with something like that: ?Select * from ?? or ?Select column1, column2, ? from ?? </o> Add the following code in the Page_Load or in a button event (enclosed in a try ? catch ? finally block)</o> sqlConnection1.Open ();</o> sqlDataAdapter1.Fill (dataSet1);</o> GridView1.DataSource = dataSet1;</o> GridView1.DataBind ();</o> </o> Create a Session or a Cache object to store the selected index in the GridView1_SelectedIndexChanged event and redirect to the form to display the columns of the selected row of the GridView1. </o> </o> You need to have a relationship between the GridView1.SelectedIndex and a key field of the handled table, for instance an ID. (Maybe there are also other methods to establish the selected row of the table based on the selected GridView.SelectedIndex ? I do not know)</o> </o> Based on the stored selected index in Session / Cache object select the row of the table and display the fields. </o> </o> </o> Do you need more details? Do not hesitate to contact me!</o> </o> Valentin</o> MCP C#</o> www.wwv-it.eu </o> [email protected]</o>