Click here to Skip to main content
15,906,455 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi All,

I have a asp.net grid view with a button Field as a column in it. On click of that field I am opening a page(like pop up) displaying some details(Grid view) with check box as one of the column in which user can select few or all records(customer details), so when the user closes this page I want to pass these selected customers to main page and again if he opens the pop up page I want to check the previously selected values in the grid. How can I achieve this in the best possible way, which costs us less. I am considering Array list in Session which I am not sure is the best way. Please guide me thank you.
Posted
Updated 15-Jun-15 22:18pm
v2
Comments
Sinisa Hajnal 16-Jun-15 4:07am    
Depending on the popup type you're using, return values will be returned differently. If you're using jQuery dialog you could do everything in jQuery.
InbarBarkai 16-Jun-15 4:38am    
I recommend using the jQuery dialog or another library's dialog.
It allows you do have all on the same page and the user's experience is better that way.
Note: You should remember that most browsers prevent some popups these days and some users won't understand why nothing happens when they click on that field.
DileepReddyC 16-Jun-15 5:11am    
Hi,It is just simple aspx page
Sinisa Hajnal 16-Jun-15 7:53am    
It is how you open it that counts: using jQuery.dialog is different then calling window.open. Depending on how you open it, method of returning the result with be different therefore it is highly relevant to your question.

Describe your method of opening the dialog and you'll get better answers (in general, better and more detailed the question, better the answers).
DileepReddyC 17-Jun-15 1:53am    
Hi,

Response.Write("<script language='javascript'> window.open('" + spath + "Base_App/SmartCardTransactions/SmartcardExportDetails.aspx?ExpIDForSearch=" + lnkExpID.Text + "|" + Session["sMode"].ToString() + "','_blank','resizable=yes,status=yes,toolbar=no,menubar=no,height=650,width=950,scrollbars=yes');</script>");

1 solution

If you are opening modal using window.open or showmodaldialog then use page or window arguments to pass selected id's back and fourth to the parent page.

If it is jQuery or JavaScript plugin to open the dialog, then store selected values in json to maintain selection.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900