DataGrid scroll question

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
 
W

web1110

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;
}
 

Ask a Question

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.

Ask a Question

Top