private void Page_Load(object sender, System.EventArgs e)
{
if (this.IsPostBack) return;
FarPoint.Web.Spread.Model.DefaultSheetStyleModel model = (FarPoint.Web.Spread.Model.DefaultSheetStyleModel)FpSpread1.Sheets[0].StyleModel;
FarPoint.Web.Spread.NamedStyle style = new FarPoint.Web.Spread.NamedStyle();
style.Name = "YellowCell";
style.BackColor = Color.Yellow;
FpSpread1.NamedStyles.Add(style);
model.SetDirectName(0, 0, "YellowCell");
ListBox1.Items.Add(model.GetDirectName(0, 0));
}
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If IsPostBack Then Return
Dim model As FarPoint.Web.Spread.Model.DefaultSheetStyleModel = FpSpread1.Sheets(0).StyleModel
Dim style As New FarPoint.Web.Spread.NamedStyle()
style.Name = "YellowCell"
style.BackColor = Color.Yellow
FpSpread1.NamedStyles.Add(style)
model.SetDirectName(0, 0, "YellowCell")
ListBox1.Items.Add(model.GetDirectName(0, 0))
End Sub