I'm trying to do auto scroll for my DataGrid, but each absolution I find
steal the focus to the DataGrid.
I also tried your suggestion using the CurrentRowIndex, but it also steals
the focus.
I am not sure why SendMessage does not work for you. As we negotiated in
the original post, this solution should work for you.(Actually, it works
well on my side.) If not, can you show me a little sample to demonstrate
the problem?
Thanks
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
[Description("Determines whether the grid will scroll down when a new row
is added."),
Category("Layout")]
public override bool AutoScroll
{
get { return m_autoScroll; }
set { m_autoScroll = value; }
}
Defects are added to the DataSet, causing the ElementsDataGrid to be added
with more rows and invoking the AddDefects() that invoke the DoAutoScroll().
And the DoAutoScroll() is invoked causing the vertical scrollbar of the
ElementsDataGrid to move --> the focus is taken to the ElementsDataGrid. And
this is the problem I wish to avoid.
The code is larger then what I have posted in here, I couldn’t post all of
it in here (much too much). I hope this post can help resolving this problem.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.