I have 2 pages, an ASPxGridview & a button in the first page, and a formview in the second page, the columns of the gridview are
ID
Name
I made the selection so that only a single row can be selected. When the user selects a row, then clicks the button, I want the ID of that row to be passed as querystring to the other page and use it in the where clause of the sqldatasource connected to the formsview.
how do i do this?
Please follow the below steps for your requirement : (This is feasible approach, if you feel good to use it)
Sample code :
2 Define custombutton click client side of the aspxgridview
Sample Code:
3.In javascript use following to pass id to another page
Sample Code :
4.Dont Forget TO Specify ID as your keyfieldname in aspxgridview definition.
If any questions, please feel free to post here.
Thanks 🙂