Spread for ASP.NET 10 Product Documentation > Developer's Guide > Managing Data Binding > Tutorial: Binding to a Corporate Database > Improving the Display by Changing the Cell Type |
In this step, you will change the cell type for one of the columns to better display the data from the database.
C# |
Copy Code
|
---|---|
FarPoint.Web.Spread.StyleInfo style = new FarPoint.Web.Spread.StyleInfo(); FarPoint.Web.Spread.CurrencyCellType curPrice = new FarPoint.Web.Spread.CurrencyCellType(); curPrice.FixedPoint = true; style.CellType = curPrice; style.HorizontalAlign = HorizontalAlign.Right; style.VerticalAlign = VerticalAlign.Middle; FpSpread1.ActiveSheetView.SetStyleInfo(-1, 3, style); |
Visual Basic |
Copy Code
|
---|---|
Dim style As FarPoint.Web.Spread.StyleInfo style = New FarPoint.Web.Spread.StyleInfo() Dim curPrice As New FarPoint.Web.Spread.CurrencyCellType() curPrice.FixedPoint = True style.CellType = curPrice style.HorizontalAlign = HorizontalAlign.Right style.VerticalAlign = VerticalAlign.Middle FpSpread1.ActiveSheetView.SetStyleInfo(-1, 3, style) |
Run your project and you should see a form that looks similar to the following:
Your bound Spread component is complete! You have completed this tutorial.