Environment: VS NET 2003 Fr
Framework: 1.1
OS: WinXP SP2 Fr
Hello
I have a problem to add with pop-up and to delete in a datagrid(ButtonColumn
delete) on WebForms.
code button HTML which opens pop-up:
<INPUT class="buttonForm"
onclick="MM_openBrWindow('../pages/recherche_ar.aspx?a=2','AR','width=700,height=500, scrollbars=yes,resizable=yes')"
type="button" value="Ajouter">
code which removes the record with the ButtonColumn in the datagrid:
public void Grid_DataGrid1(Object sender, DataGridCommandEventArgs e)
{
String ID;
switch(e.CommandName)
{
case "Delete":
ID = e.Item.Cells[0].Text;
delDepartementale(ID);
getListAdherents("ORDER BY nom ASC");
break;
}
}
code of the popup which refresh the window mother:
code behind:
Panel1.Visible=true;
code asp page:
<asp:Panel id="Panel1" runat="server" Visible="False">
<SCRIPT language="javascript">
refreshmainwindow();
</SCRIPT>
</asp:Panel>
The problem:
1)I had a record with the pop-up
2)I delete a record in datagrid with ButtonColumn
3)If I had an other record with the pop-up, E ask:
The page cannot be refreshed without resending the information. Click Retry
to send the information again, or click, Cancel to return to the page that
you were trying to view.
If I click Retry:
It add the new record in the Datagrid (page_load) and automatically
re-execute the command to delete in datagrid.
If I click Cancel:
The datagrid is not refresh.
How can I delete the command which it keept in memory and re-execute with
the command refreshmainwindow();
Thanks
.. If one adds a recording via the popone then that one removes a recording
via the column bond of the datagrid, and finally if one adds a new recording
in the popup, then IE say: The page cannot be brought up to date without the
reference of information. Click on Recommencer to return information... If
one clicks on starting again: It adds the recording in the datagrid
(page_load) then automatically re-executes the order to remove which it kept
in memory. If one clicks on Annuler, it rafraichit not the
datagrid(page_load) How can one remove the actions which it keeps in memory
so that he does not re-execute them in the function refreshmainwindow();