Trygve Thayer
asked on
C# Variable not working
I have some code that I can not seem to get working. I think I am close but don't know the correct syntax. Here is the error I am getting.
Compiling Custom Code ...
----------errors---------- --
Error: CS0246 - line 222 (3013) - The type or namespace name 'var' could not be found (are you missing a using directive or an assembly reference?)
** Compile Failed. **
Compiling Custom Code ...
----------errors----------
Error: CS0246 - line 222 (3013) - The type or namespace name 'var' could not be found (are you missing a using directive or an assembly reference?)
** Compile Failed. **
private void edvPREmployee_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
{
// ** Argument Properties and Uses **
// view.dataView[args.Row]["FieldName"]
// args.Row, args.Column, args.Sender, args.NotifyType
// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
//if ((args.NotifyType == EpiTransaction.NotifyType.AddRow))
{
if ((args.Row > -1))
{
var ep = (Epicor.Mfg.UI.FrameWork.EpiTreeViewPanel)csm.GetNativeControlReference("be35adba-2578-4a0e-9d37-4d1ba184c12e");
ep.ExpandAll();
}
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That Worked. Got some more to do but got over the hump. Thanks a bunch !!!
ASKER
The solution provided worked as expected. Thank goodness for all these experts !!!
1. Are you compiling for 3.5 or higher?
2. Positive that's the line throwing the error? Usually occurs when var is used on a field. That's not the case with your code.