I am using an UltraGrid with the Dock property set to FILL. When I load my form if the grid does not contain enough records to fill the form the grid will cause the binding sources offend event to fire each time the mouse pointer hovers over the ultragrid. Is this expected behavior?
Hi Roger,
What's an OffEnd event? I've never heard of this event and I took a look at the BindingSource object and I don't see it on there in VS2008.
Mike,
I am not sure what it is referred to as in VS2008 as we do not use VS2008. We use Progress Software's OpenEdge development environment called Visual Studio. Basically, we are batching records and grabbing 50 records at a time from the server. As you scroll down the grid when you come to the end of the record set the Progress probinding source fires an offend event to let us know we need to grab another batch of 50 records. This works just fine. The issue I am seeing is if the grid has all the records and we have received the last batch when moving the mouse pointer over the grid (not clicking on anything) the offend event will fire.
I'm afraid I am not familliar with OpenEnd or the Probinding source. So I really don't know what that event does or why anything the grid does would be triggering it. I'd have to check with developer support to be sure, but I don't think it's an environment that we support.
If the event has something to do with loading data on-demand from the data source, then perhaps you need to set the LoadStyle on the grid. That's just a wild guess, though.
It is the OpenEdge development environment called "Visual Designer" and as far as I know it is supported as Progress Software Corporation resells the Infragistics controls. I worked with Progress TS late last week and this is what they said:
"The OffEnd event will fire in the binding source any time the last data record is accessed in the control for any reason. You are causing the UltraGrid to access the last record by mousing around the last row and/or the scroll bar; the UltraGrid is preparing to ask for more records. Even working on the last row programmatically in an UltraGrid event handler will cause OffEnd to fire. This is all expected behavior. The correct way to handle it is to turn off the Batching property in the binding source after the last record has been retrieved."
We have implemented their suggestion and it appears to work.
Thanks for the info.
Ah, that makes sense.
I can certainly verify that the grid will ask the data source for any row you mouse over. The grid will get the row from the data source any time the row needs to be painted on the screen, and mousing over the row will cause a paint. So all of that seems correct.