>Is there a way to insert a new column between other columns in a data grid without utilizing the builder wizard?
-You could increase columncount and then set new column's columnorder
-Sometimes it's easier to do in code rather than using mouse and PEM sheet.
You could add a new column programmatically from command window specifying its column order. ie: To add a new column in 3rd position.
Select the grid
Go to command window
Enter commands :
aselobj(arrObj)
oGrd = arrObj[1] && Assign so you could use Intellisense
oGrd.addcolumn(3)
Column is added. You can set its properties in PEM sheet or could continue to do it programmatically. ie:
oNewCol = oGrd.columns(oGrd.ColumnCount)
oNewCol.header1.caption = "My New Column"
*...
Note that new added column's index (grid.columns(nIndex)) is new columncount, not 3. ColumnOrder is 3.
Doing it from command window or from a code window (using aselobj() to get ref.) what you're actually doing is you're using your primitive-interactive builder. If you'd do this often you could save your code, add parameters maybe and choose to register as a builder or not. Even if you don't register it you could call it as a plain prg that would still act as a builder for you (tip: doing that way you could change class of contained controls while you can't do that from PEM sheet). For a sample check Message #
539128 Cetin