Peter Kiers
asked on
Help needed with methode
Hi,
In my methode CustomColumnDisplayText I tried to call
for the function checktype. The purpose of this function
is to check if a string contains a comma (,) or a (.) if so then
false otherwise true. But I don't know how to call for this
function in the customcolumndisplay-event. And the declaration
in the customcolumndisplay-event to devide and multilpy the
value isn't correct either.
ERRORS:
1. Cannot assign to 'CheckType' because it is a 'method group'
2. Operator '/' cannot be applied to operands of type 'object' and 'int'
3. Cannot assign to 'CheckType' because it is a 'method group'
4. Operator '*' cannot be applied to operands of type 'object' and 'int'
Who can help me?
Peter
In my methode CustomColumnDisplayText I tried to call
for the function checktype. The purpose of this function
is to check if a string contains a comma (,) or a (.) if so then
false otherwise true. But I don't know how to call for this
function in the customcolumndisplay-event.
in the customcolumndisplay-event to devide and multilpy the
value isn't correct either.
private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
{
if (e.Column.FieldName == "Value")
{
if ((Properties.Settings.Default.IsMGDL == false) || (CheckType = true))
{
e.DisplayText = (e.Value / 18).ToString();
}
else if ((Properties.Settings.Default.IsMGDL == true) || (CheckType = false))
{
e.DisplayText = (e.Value * 18).ToString();
}
}
}
//*-------------------------------------------------------------*//
static bool CheckType(string value)
{
return value.Contains(",") || value.Contains(".");
}
//*-------------------------------------------------------------*//
ERRORS:
1. Cannot assign to 'CheckType' because it is a 'method group'
2. Operator '/' cannot be applied to operands of type 'object' and 'int'
3. Cannot assign to 'CheckType' because it is a 'method group'
4. Operator '*' cannot be applied to operands of type 'object' and 'int'
Who can help me?
Peter
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are welcome Peter.
Gotta love that stupid "Cannot assign to 'CheckType' because it is a 'method group'" error.
Why they can't just say 'you forgot the brackets, dummy' is beyond me ;-)
Have a good day.
Alan
Gotta love that stupid "Cannot assign to 'CheckType' because it is a 'method group'" error.
Why they can't just say 'you forgot the brackets, dummy' is beyond me ;-)
Have a good day.
Alan
ASKER
Thanks.
500 p's comming your way...
Peter Kiers