473,394 Members | 1,750 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,394 software developers and data experts.

Redraw problem with .NET Datagrid.

I'm having a strange problem with a VB.NET App, and the built in
Windows.Forms.Datagrid

I have a tabbed interface, and a DataGrid (along with other controls) on
each of my two Tabs.

If the Datagrid on my first Tab has a horizontal scrollbar automatically
drawn because the table is too wide, and I switch to the other tab and
resize the form, when I switch back to the first tab, the horizontal
scrollbar on the datagrid is in the same position it was before the resize.
The Datagrid itself however, has been resized to the fill the form's new
size, such that the Horizontal Scroll bar appears to be floating in the
middle of the Datagrid, until I resize the app form from this tab.
Unfortunately, it only occurs intermittently, and more often when the
application is used via Terminal Server/Remote Desktop on a Windows 2000
Server. I have seen it occur in debug and release mode on my Windows XP SP1
Workstation, though not as often.

I've tried adding a DataGrid.Refresh() on the Tab Switch event to get it to
redraw, but it doesn't solve the problem 100% of the time, as I say, it's
still intermittent, though it seems to occur less frequently with the
..Refresh() calls.

Has anyone else seen this sort of behaviour before, or know what could be
causing it, or a solution?

Thanks.
Nov 21 '05 #1
1 2253
Hi,

Try invalidate it instead of refresh.

Ken
----------------
"Kevin Hodgson" <ke***@caseware.com> wrote in message
news:O9**************@TK2MSFTNGP09.phx.gbl...
I'm having a strange problem with a VB.NET App, and the built in
Windows.Forms.Datagrid

I have a tabbed interface, and a DataGrid (along with other controls) on
each of my two Tabs.

If the Datagrid on my first Tab has a horizontal scrollbar automatically
drawn because the table is too wide, and I switch to the other tab and
resize the form, when I switch back to the first tab, the horizontal
scrollbar on the datagrid is in the same position it was before the resize.
The Datagrid itself however, has been resized to the fill the form's new
size, such that the Horizontal Scroll bar appears to be floating in the
middle of the Datagrid, until I resize the app form from this tab.
Unfortunately, it only occurs intermittently, and more often when the
application is used via Terminal Server/Remote Desktop on a Windows 2000
Server. I have seen it occur in debug and release mode on my Windows XP SP1
Workstation, though not as often.

I've tried adding a DataGrid.Refresh() on the Tab Switch event to get it to
redraw, but it doesn't solve the problem 100% of the time, as I say, it's
still intermittent, though it seems to occur less frequently with the
..Refresh() calls.

Has anyone else seen this sort of behaviour before, or know what could be
causing it, or a solution?

Thanks.

Nov 21 '05 #2

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

Similar topics

2
by: Ashish Patel | last post by:
Hi..friends I am .NET developer and using ASP.NET I have one problem with datagrid. I put one datagrid on the webform. When the user clicks on the Edit link then it shows some textbox in the...
0
by: Brett Hargreaves | last post by:
I'm having major problems with Datagrid and the update command. Basically when I enter into edit mode in my data grid then set a new value, the update command is not picking up the new value. ...
1
by: Brett Hargreaves | last post by:
I'm having a major problems with Datagrid and the update command. Basically when I enter into edit mode in my data grid then set a new value, the update command is not picking up the new value....
1
by: Alagu | last post by:
Hi all, I am looking for some pointers as to how to do paging with datagrid.. Well, there are so many samples out there.. What I am looking for is to be able to have a dynamic query where the...
0
by: ad | last post by:
I want to let user edit data in datagrid. But is not convenient to develop with datagrid. Are there any third party tools can do better with it?
0
by: suresh | last post by:
How to validate input with datagrid control? i tried the following code from msdn...i have problem in adding handler to the columnchanging event..its not working for me? any bug in this code? is...
1
by: AstronusX | last post by:
How to check if a Key is press down with datagrid control? I try to use OnKeyDown Event but it doesnot work? Help?
2
by: Szaki | last post by:
Hi, I have a problem with dataGrid. I have a query to database and it returns me to datagrid, something like this: -------------------- | Name | Class | |BBBBB| 2 | |aaa | 5 |...
1
by: sathyan8294 | last post by:
how to work with datagrid using 1)delete command( permanently to remove all selected rows or selected single rows) in sql database through datagrid during run time in vb.net windows application...
0
by: Mani kansal | last post by:
hi, i have a problem with datagrid.Im using 2 dropdown lists in the datagrid.. and i want to fill one dropdown list on the selection of the item of the other one... like one grid is getting...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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...

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.