DataGrid scroll question

  • Thread starter Thread starter web1110
  • Start date Start date
W

web1110

Hi y'all,

I've put together a ComboBox to display in a DataGrid - just to do it.

It works fine, except...

I added more entries to my test data, enough to scroll and:

I select a row in the middle of the table
I scroll down (the bottom entry goes off the bottom) , the ComboBox
disappears off the bottom and stays away until I scroll back
BUT I scroll up (the top entry goes off the top) , the ComboBox sticks at
the top of the DataGrid but is still assocaited with the select row (if I
change it, the row above the top of the DataGrid will change.

How do I get around this?

Thanx,
Bill
 
Got it. I linked to the DataGrid scroll event via

this.DataGridTableStyle.DataGrid.Scroll += new
EventHandler(DataGrid_Scroll);

Then hid the dropdown on the event

void DataGrid_Scroll(object sender, System.EventArgs e)
{
this.DataGridTableStyle.DataGrid.Scroll-=new
EventHandler(DataGrid_Scroll);
dgcbDropDown.Visible=false;
}
 
Back
Top