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

DataGrid stealing focus OnListChanged

I have a class (MyDataList) which implements CollectionBase and
IBindingList. This class is bound to a data grid.

Whenever my MyDataList is updated [example: OnListChanged(new
ListChangedEventArgs(ListChangedType.Reset,-1));] (another thread invokes
updates this on the UI thread) the form containing the DataGrid takes focus
and then acts like something set TopMost = true on the containing form!

I can't figure out what is causing this, and it's driving me insane!! Has
anyone encountered this before, and found a fix? Or does anyone have a
suggestion? (extend DataGrid and override something? use interop to
disable a form taking focus?)
Jul 19 '05 #1
1 1918
I have the same problem too. Search my post here with "datagrid
zorder" and you will find details. I have exhausted all kinds of
work-around that I can think of and none has worked so far. Microsoft
should fix this annoying bug.

"Matthew Fitzpatrick" <ma**@eci.com> wrote in message news:<eK**************@TK2MSFTNGP11.phx.gbl>...
I have a class (MyDataList) which implements CollectionBase and
IBindingList. This class is bound to a data grid.

Whenever my MyDataList is updated [example: OnListChanged(new
ListChangedEventArgs(ListChangedType.Reset,-1));] (another thread invokes
updates this on the UI thread) the form containing the DataGrid takes focus
and then acts like something set TopMost = true on the containing form!

I can't figure out what is causing this, and it's driving me insane!! Has
anyone encountered this before, and found a fix? Or does anyone have a
suggestion? (extend DataGrid and override something? use interop to
disable a form taking focus?)

Jul 19 '05 #2

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

Similar topics

2
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....
1
by: Matthew Fitzpatrick | last post by:
I have a class (MyDataList) which implements CollectionBase and IBindingList. This class is bound to a data grid. Whenever my MyDataList is updated (another thread invokes updates this on the...
6
by: Herve MAILLARD | last post by:
Hi, What is the best (free) datagrid for .NET ? Thanks, H. MAILLARD.
5
by: MrNobody | last post by:
I want to know how to scroll a DataGrid so that a specific row index will be visible to the user?
5
by: nadeem_far | last post by:
Hello All, I have been trying to solve the following issue and it seems like there is no solution available any where and maybe people at Microsoft should may be of some help. I am writing a...
6
by: Becker | last post by:
Very simple, I have a datagrid on a windows form. I load some rows in it. I click a column header and it sorts ascending. I click it again it sorts descending. This is great, but what I want to...
21
by: Sharon | last post by:
I have added an auto scroll feature to my DataGrid control like this: private void DoAutoScroll() { DataView dv = m_DataGrid.DataSource as DataView; DataGridCell cell = m_DataGrid.CurrentCell;...
2
by: Flack | last post by:
I have a DataGrid and a DataTable. When my form loads I create the DataTable with the appropriate columns and use it for the DataGrids.DataSource. Later on in my app, I alter the DataTable: ...
7
by: Dave Booker | last post by:
I am using a WebBrowser object in my .NET 2.0 application, but it is not shown to the user. Every time a timer event triggers it to perform a m_WebBrowser.Navigate() I get that classic IE 'click'...
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
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
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
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...
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.