PickRange method definition:

PickRange(Func<...,bool> handler, cursor)

where

  • handler is an anonymous function that is called when a range is picked by the user.
  • Return true from the handler if the picked range is acceptable. Return false to continue picking.
  • cursor is the cursor displayed while the user is picking a range. The cursor is restored to the default after the operation ends.
grid.PickRange((inst, range) =>
{
  MessageBox.Show("User picked range: " + range.ToString());
  return true;
}, Cursors.Hand);

Pick a range

Was this article helpful?