TextBoxes

TextBox controls are used for the string, integer, currency, date, and time controls in a Microsoft Dynamics GP form. Text boxes have the AutoSetDexColors property that can be set to True so the control colors will match colors in Microsoft Dynamics GP.

Unlike the standard controls in Microsoft Dynamics GP, the textbox controls have no built-in support to format data such as currency values. You will need to add additional code to your integration to match the behavior of the controls in Microsoft Dynamics GP. For instance, the following C# code sets the value of the textbox in the previous illustration. It uses the Format method for the String object to format the currency value.

// Display the value, formatting it as a currency amount
textBoxEstimatedFreight.Text = String.Format("{0:C}",EstimatedFreight);