Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSHFlexGrid: picking wrong row

Status
Not open for further replies.

LinuxKommy

Technical User
Apr 2, 2002
31
US
Ok, i've looked all over and now i can't figure this out. I use a HFlexgrid to display records from a access database. first i tried using an ADODB recordset and setting the felxgrid's datasource to the recordset. then i tried using an ADODC control as well. the result is the same. if the number of records causes the flexgrid to get a scroll bar, the first row "becomes part of" the fixed row, and when i click on the 2nd row, it gives me the info from the first row, and the third gives me the second and so on. However, if i scroll down, and tehn return to the top, everything corrects itself. why in the world would this happen? has anyone ever seen this kind of problem before?

this is important because i need the data from the row that the user clicks on, but it's not always the same.

thanks,
lk
 
Are you setting the fixed row prior to loading the data?
Are you using VB6 SP5?
 
I am using VB6 SP5, but i'm relying on the recordset to set the first row. when you say "set the first row", do you mean set the columns to the number of fields in the recordset?

thanks,
lk
 
I know this sounds crazy, but I made it auto select the first row after it loads the data and this seems to have fixedd it. If anyone has an explanation, I'd be glad to hear it.

thanks,
lk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top