473,800 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bug with DataGrid using Windows.Form... namespace

RA
Hi

I wonder if anyone tried this or know if it has been fixed.

I am using vs .net 1.1 and have a windows form.
In the form I have a DataGrid with the following format:
3 first Columns are of type text box and 5 last columns are of type
checkbox(bool) I added some rows info.
When the RowHeadersVisib le = false here is the problem I see:
When launching the application make sure to size down the window so that the
DataGrid horizontal scroll bar shows. You need to scroll it all the way to
the left so that the checkbox column will be outside of the view area. Now
if you scroll it back and forth making sure that the checkbox if out and in
the view area of the left side you will see the columns with the checkbox
has more than one checkbox. This is only happens when the checkbox column go
out of the view area on the left side of the window. When you get the
double/multiple checkboxes in one column bug, you can minimize and then
maximize the window and all goes back well.
Now if the RowHeadersVisib le = true all works fine.

Ronen

Nov 15 '05 #1
1 1730
I've seen the same problem myself. It looks to me like the DataGrid isn't
painting itself properly. Most Microsoft created controls use the
ScrollWindowEx API function when scrolling which just moves the contents of
the window instead of actually "repainting " them. If this is set improperly
it can give the same results that you and I are seeing. A quick fix might
be to call the Refresh method on the scroll event. That would force it to
get repainted on every scroll movement.

Hope this helps,
Jacob

"RA" <ro****@hotmail .com> wrote in message
news:uW******** ******@TK2MSFTN GP12.phx.gbl...
Hi

I wonder if anyone tried this or know if it has been fixed.

I am using vs .net 1.1 and have a windows form.
In the form I have a DataGrid with the following format:
3 first Columns are of type text box and 5 last columns are of type
checkbox(bool) I added some rows info.
When the RowHeadersVisib le = false here is the problem I see:
When launching the application make sure to size down the window so that the DataGrid horizontal scroll bar shows. You need to scroll it all the way to
the left so that the checkbox column will be outside of the view area. Now
if you scroll it back and forth making sure that the checkbox if out and in the view area of the left side you will see the columns with the checkbox
has more than one checkbox. This is only happens when the checkbox column go out of the view area on the left side of the window. When you get the
double/multiple checkboxes in one column bug, you can minimize and then
maximize the window and all goes back well.
Now if the RowHeadersVisib le = true all works fine.

Ronen

Nov 15 '05 #2

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

Similar topics

2
3279
by: Tamlin | last post by:
Hi all, I'm getting a bug with the datagrid object. I've created one from scratch, bound it to a dataview with 2 int32 columns and formatted the output as currency. I've found that when you use the F2 key to enter edit mode and then hit TAB or ESCAPE without actually editing the value, dotnet crashes with a null reference error.
2
2766
by: SammyBar | last post by:
Hi, I'm trying to bind a custom collection class to a data grid, following the guidelines from the article http://msdn.microsoft.com/msdnmag/issues/05/08/CollectionsandDataBinding/default.aspx. The problem is the article is in VisualBasic. I already get the collection to be recognized as a Data Source by the IDE. It populated the DataGrid correctly from the fields on the items object of the collection, but I can't get the DataGrid to...
6
13585
by: aaa | last post by:
Hi I am trying to create a read-only DataGrid that would always have current row selected. Currently, I am using method: public void SelectDataGridRow(DataGrid dg) { if (dg.CurrentRowIndex > -1) { dg.Select(dg.CurrentRowIndex);
1
1639
by: Vagabond Software | last post by:
I am creating a custom datagrid based, in part, from someone else's code. The author declared a derived datagrid class in a windows form, then declared a derived ColumnStyle class, in the same form, that accepted his custom grid type as an argument. For example: public class HisCustomGrid : DataGrid { public HisCustomGrid() { } } public class HisColumnStyle : DataGridTextBox { public HisColumnStyle(int anyint, HisCustomGrid grid) { } }...
0
3552
by: Mauro | last post by:
Hi, I need a big help to resolve this problem. I need to put a usercontrol in a datagrid: this control check if the code inserted is present in a archive and if not return a error message. (In the example I have changed this check with a easy "if string is empty" ) Everything would be easy if the datagrid had a predictable behaviour. I explain my problem.
3
4266
by: Richard | last post by:
I have a requirement to put a GDI style circle or rectangle border around the selected row of a datagrid/ It will overlap into the row above and below the selected row. Doing this in a the OnPaint of a subclassed DataGridTextBoxColum dos not seem like a practical way to do it. I have subclassed a DataGrid and overridden the OnPaint as such:
0
3505
by: Dave | last post by:
Tried posting in the Winform Forum without much luck, so posting here... After inserting a new data row to a DataTable that is bound to a datagrid, I am unable to change data in a row that is after the newly added row without getting bizarre results. I have added the full code for the test below. Create a project drop in the code and run. There is nothing crazy about the code. I used the designer to add the dataset and to do the...
2
6415
by: CSL | last post by:
I am using the DataGrid in a Windows Application, how can I adjust the widths of each column individually.
1
1131
by: Steve | last post by:
I have a DataGrid connected to a DataSet (read in from an XML file). The documentation that I've read suggests that I attach a DataGridTableStyle to the DataGrid to allow for additional formatting. Each of the three columns are text fields so I created and added DataGridTextBoxColumn to the DataGridTableStyle. I set various properties of the DataGridTextBoxColumn but none of them seem to affect the output. There is some type of...
4
10511
by: Melson | last post by:
Hi I've a problem. Can anyone help. I would like to use datagrid for data entry. How can I set the number of rows in the datagrid. And use the datagrid to update the ms sql table. regards melson
0
9691
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10505
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10253
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10035
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9090
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6813
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.