There may be times when you want to modify the order in which columns appear in a DBWebGrid control. You can accomplish this task by binding columns manually, from within the Property Builder.
Note: DB Web Controls (Borland.Data.Web namespace) are being deprecated in 2007. You should use standard Web controls instead.
To open the Property Builder
- Start a new ASP.NET application.
- Add a data provider.
- Add a DBWebDataSource object and connect it to a generated dataset.
- Add a DBWebGrid control to your Web form.
- Click the Property BuilderDesigner verb, located at the bottom of the Object Inspector. This displays the Property Builder.
To change column order
- On the Property Builder, click the General tab.
- Set the DataSource to the DBWebDataSource, or to the dataset the DBWebDataSource points to.
- Click the Columns tab.
- Select the columns you want to appear in the Available Columns list.
- Click the right-arrow button to add the columns to the Selected Columns list.
- Rearrange the column order, if you like, in the Selected Columns list.
- You can change the column heading name as it appears in the grid by changing the Header text.
- Click Apply.
- Click OK.
Warning: If you choose to bind columns in this way, you must set the AutoGenerateColumns property to False. Setting this property to True raises a runtime error, and does not allow the visible restriction of columns at designtime. If the same column is bound to a grid more than once, you may get a runtime error.