HighTechTalks DotNet Forums  

Scrolling a "DataGridView" in an "OnCellValidating()" handler

Dotnet Framework (WinForms Controls) microsoft.public.dotnet.framework.windowsforms.controls


Discuss Scrolling a "DataGridView" in an "OnCellValidating()" handler in the Dotnet Framework (WinForms Controls) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Larry Smith
 
Posts: n/a

Default Scrolling a "DataGridView" in an "OnCellValidating()" handler - 12-30-2007 , 06:05 PM






Does anyone know how to scroll a "DataGridView" during an
"OnCellValidating()" handler. If the cell being validated isn't currently in
view, I simply want to scroll it back into view before displaying any error
message. Note that "DataGridView.FirstDisplayedScrollingRowIndex" is the
obvious solution but you can't (easily) rely on this since it makes a
re-entrant call into the same "OnCellValidating()" handler among others (for
no valid reason I can think of). Circumventing this is no easy task however
as I've discovered over the past several hours. If someone knows of an
alternate way, possibly by adjusting the vertical scroll bar directly (using
"DataGridView.VerticalScrollBar" probably but I can't make this work
either), it would be greatly appreciated. Thanks in advance.



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.