Link to home
Start Free TrialLog in
Avatar of Leo01010101
Leo01010101

asked on

BCB6 DBGrid VScroll - How to make it to scroll without changing selected row

Hi, I'm looking for solution to make functionality of BCB6 DGBGrid Vscroll like in NET DataGridView ( scrolling rows without changing a selected record ).

Regards
ASKER CERTIFIED SOLUTION
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Leo01010101
Leo01010101

ASKER

Thank you very much, I didn't follow you direction before because I was not sure how to use your Delphi sample code.  Now I had to made a cosmetic change (code below) and now it is working perfectly.  

void __fastcall TForm1::NewGridWndProc(TMessage &Message)    
{
  if( Message.Msg == WM_VSCROLL )
  {
     Message.Result = 1; //handled
  }else
    //call original one
    FOrgGridWndProc(Message);
  }
}

Open in new window

I've requested that this question be closed as follows:

Accepted answer: 0 points for Leo01010101's comment #a39542682

for the following reason:

Perfect solution.