<%@ Page Title="Home Page" Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
    Inherits="_Default" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
    <title>Test</title>
    <script type="text/javascript">
        var otherCellValue;
        function batchEditCellValueChanging(sender, args) {
            if (args.get_editorValue() == otherCellValue) {
                args.set_cancel(true);
            }
        }
        function batchEditGetCellValue(sender, args) {
            if (args.get_columnUniqueName() == "FieldOne") {
                otherCellValue = parseInt(args.get_row().cells[1].innerText);
            } else {
                otherCellValue = parseInt(args.get_row().cells[0].innerText);
            }
        }
    </script>
</head>
<body>
    <form id="Form1" runat="server">
        <telerik:RadScriptManager runat="server"></telerik:RadScriptManager>
        <telerik:RadGrid ID="RadGrid1" Visible="true" Width="97%" AllowPaging="True" PageSize="15" runat="server"
            AllowSorting="true" OnNeedDataSource="RadGrid1_NeedDataSource" AutoGenerateColumns="false" GridLines="None">
            <MasterTableView Width="100%" EditMode="Batch">
                <Columns>
                    <telerik:GridBoundColumn UniqueName="FieldOne" HeaderText="FieldOne" DataField="FieldOne">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn UniqueName="FieldTwo" HeaderText="FieldTwo" DataField="FieldTwo">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings>
                <ClientEvents OnBatchEditCellValueChanging="batchEditCellValueChanging" OnBatchEditGetCellValue="batchEditGetCellValue"/>
            </ClientSettings>
            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
            <FilterMenu EnableTheming="True">
                <CollapseAnimation Duration="200" Type="OutQuint"></CollapseAnimation>
            </FilterMenu>
        </telerik:RadGrid>
    </form>
</body>
</html>
