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

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="OnNeedDAtaSource"
            AutoGenerateColumns="false" OnItemCreated="OnItemCreated" OnItemDataBound="OnItemDataBound">
            <MasterTableView CommandItemDisplay="Top">
                <Columns>
                    <telerik:GridTemplateColumn HeaderText="name">
                        <ItemTemplate>
                            <asp:Label ID="lValue" Text='<%# Eval("Name") %>' runat="server"></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox ID="tbValue" Text='<%# Bind("Name") %>' runat="server"></asp:TextBox>
                            <span>*</span>
                            <asp:RequiredFieldValidator ID="rvValue" ControlToValidate="tbValue" ErrorMessage="Cannot be empty"
                                runat="server"></asp:RequiredFieldValidator>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridEditCommandColumn UniqueName="Edit" ButtonType="ImageButton" CancelText="cancel"
                        EditText="edit" InsertText="insert">
                    </telerik:GridEditCommandColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </div>
    </form>
</body>
</html>
