We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Horizontal Scroll Tips -DataBoundGrid

The horizontal scroll tips on my DataBoundGrid always display the columns from the left side of the grid as they scroll into view. It does this whether scorlling left or right. It would be more useful for it to show the columns from the right in the tool tips when scrolling to the right and from the left when scrolling to the left. If the point is to help you find columns as you scroll, I want to be notified of the columns I''m moving toward. Can I modify this behavior now? If not, consider it a suggestion, please. I do believe that if this is ''fixed'' these horizontal scroll tips reduce the stress of using a grid by placing the feedback (tips) in the vicinty of the action (scrolling) being performed. It provides a single, visually well contrasted, item for the mind to focus on rather instead of the column header. The bigger the grid, the better it is. Thank you SyncFusion Team, Kenton

4 Replies

AD Administrator Syncfusion Team May 21, 2004 02:16 PM UTC

It was not clear to me whether you wanted to physically move the tip window or just change what is being displayed. You can do either or both. You can customize the scrolltips by handling the ScrollTipFeedback event. In your handler, you can set the actual text to be displayed (e.Text), or set the location of the tip window(e.Location in screen coordinates). The event args give you access to a lot of information as well as letting you set a lot of the tip window properties.


KH Kenton Hensley May 21, 2004 03:52 PM UTC

Thank you Clay, I want to change the text but I need to know if the user is scrolling left or right, then change the text is as follows: 2) As the user is scrolling to the right. When a new column moves into view on the right display the column header text. 3) Detect when the user is scrolling left, but this time display the column header text form columns as the move into the viewable area on the left. Thanks, Kenton >It was not clear to me whether you wanted to physically move the tip window or just change what is being displayed. You can do either or both. > >You can customize the scrolltips by handling the ScrollTipFeedback event. In your handler, you can set the actual text to be displayed (e.Text), or set the location of the tip window(e.Location in screen coordinates). The event args give you access to a lot of information as well as letting you set a lot of the tip window properties. > > >


AD Administrator Syncfusion Team May 21, 2004 07:08 PM UTC

Here is a try at this. It does have the problem that you do have to start moving the thumb before it will know what direction you are going in. int lastPosition = -1; private void gridDataBoundGrid1_ScrollTipFeedback(object sender, Syncfusion.Windows.Forms.ScrollTipFeedbackEventArgs e) { if(e.ScrollBar.ToString() == "Horizontal") { if(lastPosition == -1) { lastPosition = e.Value; } if(lastPosition > e.Value) //moving left { e.Text = string.Format("Left Col= {0}", e.Value - 1); } else if(lastPosition < e.Value) //moving right { int cols = this.gridDataBoundGrid1.ViewLayout.LastVisibleCol - this.gridDataBoundGrid1.LeftColIndex - 1; e.Text = string.Format("Right Col= {0}", e.Value + cols); } lastPosition = e.Value; } }


KH Kenton Hensley May 24, 2004 01:04 AM UTC

Thank-you very much Clay. Works fine except as you point out that the very first tip displayed is not meaningful immediately - that still needs some work - but I''m on my way. The HeaderText from InnerColumns does the trick.

Loader.
Live Chat Icon For mobile
Up arrow icon