DetailsView -> getting immediately into insert/edit mode when page loads
-
Hi guys, I'm wondering of these are possible: 1) I have a asp.net page that has a DetailsView in it. When the page loads it would load the 1st record in the database (which is fine). I have also "activated" the new (insert) button. Is there a way for asp.net to auto activate the new? I mean, when the page loads, can it be in the "insert" mode immediately instead of the details display mode? 2) Also, is it possible to allow the user to select a record from a GridView and then have the page redirect to another page where it is in edit mode? i.e. upon clicking select in GridView, another page is open where it is in edit mode for that record selected? If not, is there another way of doing this? Like creating a edit page where the user has to enter the record s/n they want to edit and have the DetailsView brought up in edit mode? Thanks. Desmond
-
Hi guys, I'm wondering of these are possible: 1) I have a asp.net page that has a DetailsView in it. When the page loads it would load the 1st record in the database (which is fine). I have also "activated" the new (insert) button. Is there a way for asp.net to auto activate the new? I mean, when the page loads, can it be in the "insert" mode immediately instead of the details display mode? 2) Also, is it possible to allow the user to select a record from a GridView and then have the page redirect to another page where it is in edit mode? i.e. upon clicking select in GridView, another page is open where it is in edit mode for that record selected? If not, is there another way of doing this? Like creating a edit page where the user has to enter the record s/n they want to edit and have the DetailsView brought up in edit mode? Thanks. Desmond
Check this url[^]. This would help you.
[Venkatesh Mookkan] My: Website | Yahoo Group | Blog Spot
-
Hi guys, I'm wondering of these are possible: 1) I have a asp.net page that has a DetailsView in it. When the page loads it would load the 1st record in the database (which is fine). I have also "activated" the new (insert) button. Is there a way for asp.net to auto activate the new? I mean, when the page loads, can it be in the "insert" mode immediately instead of the details display mode? 2) Also, is it possible to allow the user to select a record from a GridView and then have the page redirect to another page where it is in edit mode? i.e. upon clicking select in GridView, another page is open where it is in edit mode for that record selected? If not, is there another way of doing this? Like creating a edit page where the user has to enter the record s/n they want to edit and have the DetailsView brought up in edit mode? Thanks. Desmond
1. Set the default mode of the detailview to 'Insert'. 2. Yes its possible by manipulating any appropriate event like OnItemCommand.
-
1. Set the default mode of the detailview to 'Insert'. 2. Yes its possible by manipulating any appropriate event like OnItemCommand.
Wasif Ehsan wrote:
1. Set the default mode of the detailview to 'Insert'. 2. Yes its possible by manipulating any appropriate event like OnItemCommand.
Thanks a million. 1 works now. but I have no idea how to go about doing 2. Do you have an example or something that I can read? Thanks. Desmond