<%@ Page Language="VB" Inherits="System.Web.UI.Page" %>
<%@ Register assembly="GrapeCity.Web.Input.v100, Version=10.0.4000.2012, Culture=neutral, PublicKeyToken=c3bd7c1dccef5128" namespace="GrapeCity.Web.Input.IMValidators" tagprefix="im_validator" %>
<%@ Register assembly="GrapeCity.Web.Input.v100, Version=10.0.4000.2012, Culture=neutral, PublicKeyToken=c3bd7c1dccef5128" namespace="GrapeCity.Web.Input.IMExtenders" tagprefix="im_extenders" %>
<!DOCTYPE html>
<script language="VB" type="text/VB" runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
InitVaSpread1()
End Sub
Private Sub InitVaSpread1()
FpSpread1.EditModeReplace = True
FpSpread1.ProcessTab = True
FpSpread1.HorizontalScrollBarPolicy = ScrollBarPolicy.Never
FpSpread1.VerticalScrollBarPolicy = ScrollBarPolicy.Always
FpSpread1.ActiveSheetView.DefaultRowHeight = 37
FpSpread1.ActiveSheetView.RowCount = 4
FpSpread1.ActiveSheetView.ColumnCount = 2
FpSpread1.ColumnHeader.Cells(0, 0).Value = "Col1"
FpSpread1.ColumnHeader.Cells(0, 1).Value = "Col2"
FpSpread1.ActiveSheetView.Columns(0).Width = 100
FpSpread1.ActiveSheetView.Columns(1).Width = 100
FpSpread1.ActiveSheetView.Columns(0).BackColor = Drawing.Color.Yellow
FpSpread1.ActiveSheetView.Columns(0).CellType = New TextCellType With {.AllowWrap = True}
Dim intCell As New IntegerCellType
intCell.MinimumValue = 1
intCell.MaximumValue = 999
GcCharacterTypeValidator1.ID = "dataTypeValidator1"
GcCharacterTypeValidator1.ValidateOnInput = True
GcCharacterTypeValidator1.CharacterSet = "9"
GcCharacterTypeValidator1.ValidatorActionID = "GcValidatorAction1"
Dim valProc As New ValueProcess
valProc.ValueProcessOption = ValueProcessOption.Restore
GcValidatorAction1.DefaultActions.Add(valProc)
intCell.Validators.Add(GcCharacterTypeValidator1)
FpSpread1.ActiveSheetView.Columns(1).CellType = intCell
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<FarPoint:FpSpread ID="FpSpread1" runat="server" BorderColor="#A0A0A0" BorderStyle="Solid" BorderWidth="1px" Height="200" Width="400">
<CommandBar BackColor="#F6F6F6" ButtonFaceColor="Control" ButtonHighlightColor="ControlLightLight" ButtonShadowColor="ControlDark">
</CommandBar>
<Sheets>
<FarPoint:SheetView SheetName="Sheet1">
</FarPoint:SheetView>
</Sheets>
</FarPoint:FpSpread>
<im_validator:GcCharacterTypeValidator ID="GcCharacterTypeValidator1" runat="server" ErrorMessage="GcCharacterTypeValidator" HasLoadFromXml="True"></im_validator:GcCharacterTypeValidator>
<im_extenders:GcValidatorAction ID="GcValidatorAction1" runat="server"></im_extenders:GcValidatorAction>
</form>
</body>
</html>
|