opensubscriber
   Find in this group all groups
 
Unknown more information…

d : dotnet-winforms@discuss.develop.com 29 January 2008 • 9:39PM -0500

Overriding SetValue in DataGridViewTextBoxCell
by Brady Kelly

REPLY TO AUTHOR
 
REPLY TO GROUP




I'm overriding SetValue in my custom cell, to parse the new value and decide
what value type it is, e.g. if it starts with #, then it is a string
literal, otherwise it is a field name.  Now I want to handle aggregate
functions as well, so I need to parse for, e.g.  Sum('xxx'), where 'xxx' is
a field name.  How do I cancel the edit if the input is of bad aggregate
syntax, or a non-defined function, such as MyFunc('xxx')?  Do I throw an
exception in SetValue, catch it, and cancel the edit event?  How is this
normally handled in bound grids?

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

opensubscriber is not affiliated with the authors of this message nor responsible for its content.