473,508 Members | 2,295 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bound True Grid dont refresh after delete

I'm having a problem with the grid not getting refreshed after
deleting a record. Even though the record is deleted from the table. I
have the following code in a Delete button event:
sql = "Delete from OrderDetails where Orderid = " &
datOrderItems.Recordset!OrderId
sql = sql & " and ProductId = '" &
datOrderItems.Recordset!ProductId & "'"
gconn.Execute sql
datOrderItems.Recordset.Requery
datOrderItems.Recordset.MoveNext
If datOrderItems.Recordset.EOF Then
datOrderItems.Recordset.MoveLast
End If
datOrderItems.Recordset.Filter = "Orderid = " &
cmbOrders.Columns.Item(0).Text
grdOrderDetails.ReBind

Why does the row that was deleted still show in the grid after the
delete. If I change the filter on the recordset, it will display the
new results, but when I come back to the old Order#, the same contents
will display, even the deleted record. If I close the form and load it
again, the record gone. What the heck is going on. Please help.
Thanks Michael
Jul 17 '05 #1
0 1950

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

Similar topics

0
1440
by: Spitz | last post by:
I keep getting the exception An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll (Additional information: Object reference not set to an instance of an...
3
1786
by: Matthew Woods | last post by:
Hi, is there any way to format and order the columns displayed in a datagrid bound to a class that inherits from IBindingList? i have used DataGridTableStyle and added DataGridTextBoxColumns to it...
0
2985
by: Adam J. Schaff | last post by:
Hello. I have a custom collection that implements IBindingList (allownew and allowremove are both true). I have bound it to a datagrid. I have add and remove buttons on the screen. I want to...
6
2381
by: Frank | last post by:
Hopefully this is the correct group for this message. My previous post to (I assume) a non-.net group was not welcomed. I have a form with 7 text boxes that are all bound to fields of a...
0
1124
by: LeAnne | last post by:
In my ASPX page, I populate the GRID when the user selects an item in the dropdown list. Thus, the data is fetched and the data grid DataBind() method is executed in the PostBack (i.e. IsPostBack...
6
1798
by: Murray Hopkins | last post by:
Hi. THE QUESTION: How do I get a reference to my Object when processing an event handler bound to an html element ? CONTEXT: Sorry if it is a bit long. I am developing a JS calendar tool....
2
6280
by: Ismail | last post by:
Hello, I have grid view which can go into edit mode. I have fields one of which is primary key I dont want to display this field but will use this field in my update method. If I make the...
8
3190
by: squrel | last post by:
The line itm.ListSubItems.Item(j).Bold = chkBold.Value is giving me error out of bound i think is bcoz of the size of j variable which is related to remark option.. but dont knw how to remove the...
2
3512
by: skanemupp | last post by:
so my little calculator works perfectly now. just having some trouble with the layout. this whole tkinter-thing seems to be more tricky than it should be. how can i make the 4 column of buttons...
0
7228
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
7128
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
7332
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7058
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...
1
5057
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...
0
4715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
426
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.