The basic NetTiers script used to produce the Window.Forms Edit Control library (TableEditControlBase.cst) creates the edit control labels using the entity (table) field names. So if you want to utilize these user controls, you have to change the labels each time you recreate your NetTiers project. Very annoying!
But I found a work around.
In SQL Server you can set the extended properties of any object. For example, the default extended property is "MS_Description". For each field in my database I set the MS_Description property to the display name I wanted to appear in that field's label. Then I modified the TableEditControlBase script to use this property value as my label.text contents rather than the field names.
So here is how you can do it.
1. Open your SQL Server tables and use the extended property "MS_Description" to hold the strings you want to appear in the edit control labels.
2. Open the TableEditControlBase.cst in NetTiers studio edit mode.
3. Use the script in the attached file to replace the code between these two labels (to make things more clear, I left these labels in the attached script)
//
// uxErrorProvider
//
*****************************************************
NEW STUFF HERE
******************************************
//this.uxTableLayoutPanel.Controls.Add(this.<%=dgvColumnName%>Label);
//
Now when you recreate your datalayer and include the Windows.Forms module, the custom controls will reference the strings you put into each field's MS_Description extended property.
Very handy....
Have fun
Joe Rich
Rich Solutions