hi, iam using asp.net with c#
in my gridview control in template field iam having a checkbox control
when user selects the checkbox that row should be added to data base when user clicks on add button, but user is selecting the check box but without clicking on add button the user is clicking the next button to navigate on other page .how to handle this situation. can u give me example which helps me
Loading
CrishPosted Jun 6, 2010, 1:52 AM
take one hidden textbox for saving checkbox value is checked or not.
When user click on Next button then check value in this textbox using javascirpt. If textbox having value then go next else popup error message for selecting checkbox is needed.
Also, you can loop through know user has selected checkbox values or not...on click of Nextbutton
Don't forget to Mark Do you like this Answer
that solved your problem!
vivek kulkarniPosted Jun 5, 2010, 7:15 AM
1. Let the user select and go next without add when on the next screen when he finally selects and clicks the add button the previously selected records shud also be added to database.
2. When the user selects a record disable next enable the next only when add is clicked
3. Inform the user that he has selected a record however not added and would he like to add the record if the user accepts the record will be added to db and if not the next set will be displayed.
You can discuss with your client about these options and accept one.
Thank you,
Vivek