selecting a row in gridview
-
i have one button and one gridview in that i have filled data using
public void GetData()
{ SqlConnection con = new SqlConnection(constr);
string cmd = "select a.errname as ErrorName, m.errortype as ErrorType,
a.errpointsdeducted as PointsDeduction, convert(varchar,a.createddate,104)
as CreatedDate from auditerrors a,auditerrormaster m where
a.errtypeid=m.internalid order by m.errortype";
SqlDataAdapter da = new SqlDataAdapter(cmd,con);
DataSet ds = new DataSet();
DataTable dt = new DataTable();
da.Fill(ds, "auditerrors");
dt = ds.Tables["auditerrors"];
gvAuditErrors.DataSource=ds.Tables[0];
gvAuditErrors.DataBind();}in the same project i have another page with one text box in it. i want user to select a row in the gridview and click on the button to modify the createddate of that particular row (for this i have provided textbox in the other page, i want that selected row's date to be in the textbox control) if anybody got the solution plz do let me know tasks: selecting a row on double clicking the row transfering the content from first page to the other 2 hrs back i have posted the same question to C# forum but i did'nt got any sol. till now anyway my project is related to both the forums regards sunil
-
i have one button and one gridview in that i have filled data using
public void GetData()
{ SqlConnection con = new SqlConnection(constr);
string cmd = "select a.errname as ErrorName, m.errortype as ErrorType,
a.errpointsdeducted as PointsDeduction, convert(varchar,a.createddate,104)
as CreatedDate from auditerrors a,auditerrormaster m where
a.errtypeid=m.internalid order by m.errortype";
SqlDataAdapter da = new SqlDataAdapter(cmd,con);
DataSet ds = new DataSet();
DataTable dt = new DataTable();
da.Fill(ds, "auditerrors");
dt = ds.Tables["auditerrors"];
gvAuditErrors.DataSource=ds.Tables[0];
gvAuditErrors.DataBind();}in the same project i have another page with one text box in it. i want user to select a row in the gridview and click on the button to modify the createddate of that particular row (for this i have provided textbox in the other page, i want that selected row's date to be in the textbox control) if anybody got the solution plz do let me know tasks: selecting a row on double clicking the row transfering the content from first page to the other 2 hrs back i have posted the same question to C# forum but i did'nt got any sol. till now anyway my project is related to both the forums regards sunil
Call Javascript:Window.Open() method on the click of the record by passing the ID of the Selected Row as QueryString and then Query the Database for the neccessary details of the particular Record and show it on the popup page.
window.Open("SecondPage.aspx?Id="+val)
- Regards -
JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
-
Call Javascript:Window.Open() method on the click of the record by passing the ID of the Selected Row as QueryString and then Query the Database for the neccessary details of the particular Record and show it on the popup page.
window.Open("SecondPage.aspx?Id="+val)
- Regards -
JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
John Prabhu wrote:
on the click of the record by passing the ID of the Selected Row as QueryString
the main problem for me is passing ID of the selected row sir can you please tell me in detail how to pass the ID of the selected row if possible with example regards sunil