Edit Function in datagrid
-
I wish to do, click on the Edit hyperlink in the datagrid, and it brings me to another page, where I can do the edit in a new page. Please advice? Thanks.
If you set the datagrid AuroGenerateColumns to false and add a HyperlinkColumn, the syntax is something like Then in the edit page have a form that is populated with the data extracted using the id passed on the querystring. If I had a better memory I would remember more.
-
If you set the datagrid AuroGenerateColumns to false and add a HyperlinkColumn, the syntax is something like Then in the edit page have a form that is populated with the data extracted using the id passed on the querystring. If I had a better memory I would remember more.
-
Hie..... I'm still stuck with the Sub Page_Load of the detailpage.aspx. I don't know how to code it. I'm using Ms Access as my database. Can you please help me. Thank you.
In Page_Load you need to get the ID from the querystring (you may also need to convert it to whatever type the id is in your db as the querystring value is a string) then use it to extract only the record with that id from your database. You can then set your edit controls to the values from the database record like, if you have a dataset with the results..
txtName.Text = dataSet.Tables[0]Rows[0]["Name"]
If I had a better memory I would remember more.