Enabling and displaying data in other controls on double click of a row in the datagrid

Dec 22 2007 11:19 PM

Hi,

I am developing a webproject in C#.net using .net2005.

My project contains two pages. First page displays data from the database in a datagrid view. when i double clicks a row in the datagrid it directs to the second page.

for this i am writing the following code in the rowcreated event of the datagrid.

  e.Row.Attributes.Add("ondblclick", String.Format("window.location='" + Columns[i].ToString() + "'"));

here the arraylist Columns contains the following sample data

Columns.Add( "frmOtherPage.aspx?ListType=Empty&ViewType=Invoice&UniqueId=" + uniqueid.ToString());

In the datagrid i am not displaying this unique id.

on double click of the row i am getting the uniqueid of that particular row in the second page.

In second page i am displaying the data of the selected row in detail and diplaying the sub activities of this row in a data grid. In this grid also i am not displaying the activityid.

Here i have to display some controls to create a new sub activity. I am placing all these controls in a panel and displaying (.visible = true) them when user clicks the create sub activity button.

Here what i want is, on doubleclicking a row on the sub activities grid the panel for creating activity must be visible and i have to display the data of that row in those controls of the panel.

Please Help me. Its urgent.

Thanks in Advance

Ramu