Setting each segment automatically on EpiGLAccountEditor

,

Hello I am trying to figure out a way to set the segment values on the EpiGLAccountEditor. I have it where users select their department and the chart and it will automatically get the division based on the users company. I am having trouble setting the GL Account values from the drop down choices and I was wondering if it was possible? I am unable to find any documentation on this specific control unfortunately.

Bump please.

Is the Devil’s work!

2 Likes

The devil’s own design even. I think the GL info is bound using a delimited string of some sorts you might need to build the string using your dropdowns and set the GL value using some sort of method or property aside from just the field binding? I can’t remember which way it goes but the segments might be stored separate fields or delimited. Might help to look at data dictionary get a better lay of the land to reverse engineer.

1 Like

GlControl.EditorValue = “div|dept|account” or whatever you segments are. That might work for EpiBinding dataview field too? not sure.

1 Like

I tried it this way but this didn’t work

private void SetGLAccount()
{
     DataRowView rhView = (oTrans.EpiDataViews[Config.headView] as EpiDataView).dataView[0];
     string chart = String.Format("{1}|{0}|{2}", rhView["SegValue3"].ToString(), GetDivision(), rhView["SegValue1"].ToString()); 
     rhView["BalanceAccount"] = chart;
}

This wouldn’t work if this is what you are talking about?

If the dataview route didn’t work try updating the EditorValue directly and see what you get? Or you might have to do a BeginEdit and EndEdit and notify on the existing code you have there depends on what and where it’s called.

Do you know where I can get a list of properties for that control? I think that is what you are talking about with the EditorValue? Am I wrong?

It is indeed and the easiest way is launching with VS debug mode.

I don’t see EditorValue in vs debug under the epiGLAccountEditor control, just basic ones like font, default back color, etc.

bump, still trying to set the value of EpiGlAccountEditor. No luck as of yet.

So that should work I do it in the Write Off and Adjustment Screen and it works fine.

edvCashDtlTGLC.dataView[edvCashDtlTGLC.Row].BeginEdit();
edvCashDtlTGLC.dataView[edvCashDtlTGLC.Row]["GLAccount"] = myAccountVar;
edvCashDtlTGLC.dataView[edvCashDtlTGLC.Row].EndEdit();

What screen are you trying to do this in? One thing may be the field you are assigning, do a trace and make sure that when you do it manually that is the same field that populates in the trace.
Also make sure you notify after assigning