79444388

Date: 2025-02-17 04:23:28
Score: 0.5
Natty:
Report link

The logic of columns alignment using AlignGridColumns and AlignColumns is interfering with the workings of my InitializeFormControl, which used to define the fields' data types for them to be aligned in the gridview.

InitializeFormControl()

private void InitializeFormControl()
{
    FormControlUtil f = new FormControlUtil(myDBSetting);

    // Currency fields
    f.AddField("TotalExTax", FormControlUtil.CURRENCY_FIELD);
    f.AddField("ServiceCharge", FormControlUtil.CURRENCY_FIELD);

    f.InitControls(this);
}

So, removing both AlignGridColumns and AlignColumns solved the issue.

Credits to my senior.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Terrance Cheng