473,386 Members | 1,846 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,386 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?)
Nov 13 '05 #1
1 1900
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?)

Nov 15 '05 #2

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

Similar topics

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...
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....
6
by: Herve MAILLARD | last post by:
Hi, What is the best (free) datagrid for .NET ? Thanks, H. MAILLARD.
2
by: Robert Misiak | last post by:
Is it possible to display a window on top without it stealing focus? (and I'm not talking about stealing focus from my application - I'm talking about it stealing focus from any application.) ...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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
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...

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.