我的 Telerik:RadGrid 标签:
<telerik:RadGrid ID="grdSettlement" runat="server" AllowFilteringByColumn="True"
DataSourceID="SqlDataSource1" AllowAutomaticDeletes="True" AllowAutomaticUpdates="True"
AllowAutomaticInserts="true" OnInsertCommand="grdSettlement_InsertCommand">
我的专栏:
<telerik:GridTemplateColumn DataField="NO" FilterControlAltText="Filter NO column"
HeaderText="NO" SortExpression="NO" UniqueName="NO" DataType="System.Int64">
<InsertItemTemplate>
<telerik:RadNumericTextBox runat="server" ID="No">
</telerik:RadNumericTextBox>
</InsertItemTemplate>
<ItemTemplate>
<%# Eval("NO") %>
</ItemTemplate>
</telerik:GridTemplateColumn>
C# 代码来访问它:
protected void grdSettlement_InsertCommand(object source, GridItemEventArgs e)
{
((e.Item as GridEditableItem)["NO"].Controls[0] as TextBox).Text = "007";
}
我可以写一些代码,但是给我一个编译错误...帮我解决这个问题...