473,403 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Problem to add and delete with a DataGrid

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();
Dec 14 '05 #1
0 1479

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: clyyy2002 | last post by:
At added two column and more column hereafter,I immediately click del button,the program is no problem. but if i first click the DataGrid columnHeader and then click the del button, i find when...
3
by: vinayak | last post by:
Hi I am displaying data in Datagrid in ASP.NET with Edit/Update functionality for each row. On the same page I have 2 Button controls which submits the request to server. These button controls...
0
by: Curtis Hatter | last post by:
I apologize if this has been answered, but on the .NET 247 site I saw a thread titled "Datagrid's ItemCommand Event", and had similar troubles with the Datagrid not properly firing the delete event...
2
by: Lars Netzel | last post by:
Hi What events are there to do things in when I am on a row in a datagrid (bound from a dataset) and press Delete key... There's no Delete Event on the drig and I can't figure out if there are...
4
by: Jeff User | last post by:
Hi I tryed to solve this problem over in the framework.asp group, but still am having trouble. Hope someone here can help. using .net 1.1, VS 2003 and C# I have an asp.DataGrid control with a...
1
by: thebison | last post by:
Hi all, I hope someone can help with this relatively simple problem. I am building a timesheet application using ASP.NET C# with Visual Studio 2003.As it is only a protoype application, my...
9
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
2
by: Iain | last post by:
Hi All Using Delphi 2006 developer - C# Project I have the following 2 event handlers for the datagrid - see botton of page Both events will fire off correctly but i have a problem collecting...
1
by: mero | last post by:
hi to all; i have in my site a datagrid that is used to show the data about the user who registered to the site(lastname,firstname,...). the idea from this datagrid that the admin can view the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.