I have a radgrid with checkboxes for each row and a save button below the grid to save the selections to the database. It only saves page by page, so that if a user clicks the next page and has not saved, I want to pop up a radconfirm alerting the user that he has not saved, and give him a yes/no choice to change pages. The change page function takes an agument of 'next' or 'prev' or 'first' or 'last'. If on page change click I call a function that calls radconfirm, and then the callbackfunction for radconfirm will change the page if clicked yes, the argument for page direction gets sent, but not an argument for the yes or no. How do I get the confirm arguement sent to the call back funtion?
Here is a bit of code: argument is the 'next', 'prev'..... the function cp1 is trying to test if they clicked yes, but arg is null.
Here is a bit of code: argument is the 'next', 'prev'..... the function cp1 is trying to test if they clicked yes, but arg is null.
<asp:ImageButton ID="Button1" runat="server" OnClientClick="changePage1('first'); return false;" |
CommandName="Page" CommandArgument="First" ImageUrl="~/Images/first.gif" /> |
function changePage1(argument) { |
radconfirm('You have not saved your choices. If you change pages you will lose your data. Are you sure you want to change?', |
cp1(argument)); |
// tableView1.page(argument); |
} |
function cp1(argument,arg) { |
if(arg){ |
tableView1.page(argument); |
} |
} |