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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<title></title>
	<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
</head>
<body>
	<form id="form1" runat="server">
		<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
			<Scripts>
				<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
				<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
				<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
			</Scripts>
		</telerik:RadScriptManager>
		<script type="text/javascript">
			function pageLoad() {
				var data = [{ Text: "TEXT" }];
				var mtv = $find('<%=RadGrid1.ClientID %>').get_masterTableView();
				mtv.set_dataSource(data);
				mtv.dataBind();
			}
			function gridCommand(sender, args) {
				//
			}
function onGridRowBound(sender, args) {
	var btn = args.get_item().findElement("RadTextBox1");
	btn.value = args.get_dataItem().Text;
}
		</script>
		<telerik:RadGrid runat="server" ID="RadGrid1" AutoGenerateColumns="false">
			<MasterTableView>
				<Columns>
					<telerik:GridTemplateColumn DataField="Text">
						<ItemTemplate>
							<telerik:RadTextBox ID="RadTextBox1" runat="server"/>
						</ItemTemplate>
					</telerik:GridTemplateColumn>
				</Columns>
			</MasterTableView>
			<ClientSettings>
				<ClientEvents OnCommand="gridCommand" OnRowDataBound="onGridRowBound" />
			</ClientSettings>
		</telerik:RadGrid>
	</form>
</body>
</html>
