using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
// Implement the IUIElementCursorFilter interface on a class
// (in this case the form)
public class Form1 : System.Windows.Forms.Form,
Infragistics.Win.IUIElementCursorFilter
{
private Cursor myCustomCursor = null;
private void Form1_Load(object sender, System.EventArgs e)
{
// load and cache the resize cursor from an embedded resource
this.myCustomCursor = new Cursor(this.GetType(), "MyResizeCursor.cur");
// Set the grid's CursorFilter property to the object that
// implements the IUIElementCursorFilter interface.
this.ultraGrid1.CursorFilter = this;
}
public void BeforeSetCursor(Infragistics.Win.UIElement element,
bool adjustableCursor, ref System.Windows.Forms.Cursor cursor)
{
// If the mouse is over the adjustable area of a
// HeaderUIElement then return our custom resize cursor
if (adjustableCursor &&
element is HeaderUIElement)
{
cursor = this.myCustomCursor;
}
}