<ej:Grid ID="grdLines"
runat='server'
MinWidth="600"
EnableTheming="true"
IsResponsive="true"
AllowScrolling="true"
AllowSorting="false"
AllowResizing="true"
AllowPaging="false"
EnableTouch="true"
GridLines="None"
AllowSelection="true"
Selectiontype="Multiple"
OnServerAddRow="grdLines_ServerAddRow"
OnServerEditRow="grdLines_ServerEditRow"
OnServerDeleteRow="grdLines_ServerDeleteRow">
<Columns>
<%--<ej:Column Type="checkbox" Width="10"></ej:Column>--%>
<ej:Column HeaderText="ลำดับ" Field="LineNo" TextAlign="Left" DataType="Integer" Width="30" AllowEditing="false" IsPrimaryKey="true"></ej:Column>
<ej:Column HeaderText="รหัสบัญชี" Field="AccountCode" TextAlign="Left" Width="100" AllowEditing="true" Visible="false"></ej:Column>
<ej:Column HeaderText="บัญชี" Field="AccountNameTH" TextAlign="Left" Width="100" AllowEditing="true">
<EditTemplate Create="create" Read="readAccount" Write="writeAccount" />
</ej:Column>
<ej:Column HeaderText="รายละเอียด" Field="Description" TextAlign="Left" Width="100" AllowEditing="true"></ej:Column>
<ej:Column HeaderText="จำนวนเงินเดบิต" Field="DebitAmount" DataType="Decimal" TextAlign="Right" Width="50" AllowEditing="true" Format="{0:n2}">
<EditTemplate Create="create" Read="readDebit" Write="writeDebit" />
</ej:Column>
<ej:Column HeaderText="จำนวนเงินเครดิต" Field="CreditAmount" DataType="Decimal" TextAlign="Right" Width="50" AllowEditing="true" Format="{0:n2}">
<EditTemplate Create="create" Read="readCredit" Write="writeCredit" />
</ej:Column>
<ej:Column HeaderText="แผนก" Field="DivisionCode" TextAlign="Left" Width="50" AllowEditing="true" Visible="false"></ej:Column>
<ej:Column HeaderText="แผนก" Field="DivisionNameTH" TextAlign="Left" Width="50" AllowEditing="true">
<EditTemplate Create="create" Read="readDivision" Write="writeDivision" />
</ej:Column>
<ej:Column HeaderText="ฝ่าย" Field="DepartmentCode" TextAlign="Left" Width="50" AllowEditing="true" Visible="false"></ej:Column>
<ej:Column HeaderText="ฝ่าย" Field="DepartmentNameTH" TextAlign="Left" Width="50" AllowEditing="true">
<EditTemplate Create="create" Read="readDepartment" Write="writeDepartment" />
</ej:Column>
<ej:Column HeaderText="โครงการ" Field="ProjectCode" TextAlign="Left" Width="50" AllowEditing="true" Visible="false"></ej:Column>
<ej:Column HeaderText="โครงการ" Field="ProjectNameTH" TextAlign="Left" Width="50" AllowEditing="true">
<EditTemplate Create="create" Read="readProject" Write="writeProject" />
</ej:Column>
<ej:Column Field="VendorCustomerCode" Visible="false"></ej:Column>
</Columns>
<EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True" EditMode="Batch"></EditSettings>
<ToolbarSettings ShowToolbar="True" ToolbarItems="add,edit,delete,update,cancel"></ToolbarSettings>
<KeySettings InsertRecord="118" EditRecord="119" SaveRequest="120" />
<ScrollSettings
Height="300"
AutoHide="false"
EnableTouchScroll="true" />
<ClientSideEvents ActionComplete="Complete" RowSelected="RowSelect" DataBound="scrollGridToBottomWithCondition"></ClientSideEvents>
</ej:Grid>