473,325 Members | 2,442 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,325 software developers and data experts.

Datagrid not clearing

I have a problem with the datagrid not clearing when the datasource changes,
a few fields remain on the screen and even when new data would fill those
grid squares the old data remains.

I wind up with

101

Another field

and the rest of the grid is blank (as expected when no data exists in the
table).

I have added explicitly clearing the data source and reatching the table,
refreshing before and after (I am up to this now and it still leaves a dirty
screen):

dtHours.Clear()
dgEmpHours.DataSource = Nothing
dgEmpHours.Refresh()
dtHours = TAF.LocalProcDB.DB.GetDataTable(strSQL)
dgEmpHours.DataSource = dtHours
FormatHoursGrid()
dgEmpHours.Refresh()

Thank you for any help. (VS 2003, VB.NET)

Gary

Jul 21 '05 #1
0 1873

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

Similar topics

3
by: Brad | last post by:
I'm working with a DataGrid in C#, and the user needs to be able add and remove columns from the DataGrid on the fly, without opening and closing the form. The scenario is this. I have a setup...
5
by: John Richardson | last post by:
I've been bothered for some time about my DataGrid not populating my rows very quickly. I have about 10K rows loading into the grid. I create a datatable dt with 2 columns, an ID and a display. ...
2
by: enak | last post by:
I can not get my datagrid to page. I have a datagrid that I can sort 2 of the columns. This works great. I added paging and when I display the dg it shows 5 pages. (I am showing page numbers at...
0
by: guy | last post by:
I have a winforms datagrid bound to an arraylist which works correctly, however if I add a row to the arraylist i cannot get the datagrid to display the updated data other than by:- clearing the...
0
by: Gary | last post by:
I have a problem with the datagrid not clearing when the datasource changes, a few fields remain on the screen and even when new data would fill those grid squares the old data remains. I wind...
1
by: amber | last post by:
Hello, What is the best method of clearing a datagrid? I'm having issues with it not 'resetting' when I want to repopulate it. I usually design my datagrids using the .net toolbar/properties, but...
9
by: mfahnestock | last post by:
Hi all! Aspiring VB programmer losing hair <And Sleep> over this problem. I have spent several days researching through the various usenets and resources to no avail, and so now I am taking the...
2
by: DaveP | last post by:
I've got to be missing something very simple here, but I'm stumped. I have a DataGrid control on a form. The form allows search of a database and display of resulting rows in the DataGrid. My...
4
by: gane | last post by:
Hi, I am creating datagrid bound column dynamically and need to check if a datagrid column already exists?Is there a way to check this? thanks gane
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.