我正在使用RadGrid
Telerik 的 a 并尝试根据页面上的其他位置切换 aRadioButtonList
的AutoPostBack
属性。CheckBox
<telerik:RadGrid ID="rg" runat="server" Skin="Office2010Silver" GridLines="Both" OnNeedDataSource="rg_NeedDataSource"
OnItemDataBound="rg_ItemDataBound">
<MasterTableView Width="100%" DataKeyNames="StudentID, Response, Tested">
<Columns>
<telerik:GridBoundColumn UniqueName="StudentName" HeaderText="Student Name" DataField="StudentName"></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="StudentID" HeaderText="Student ID" DataField="StudentID"></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="Answer" HeaderText="Answer" DataField="Answer"></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="Response" HeaderText="Score" DataField="Response"></telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Score" ItemStyle-Wrap="false">
<ItemTemplate>
<asp:RadioButtonList ID="rblScore" runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal" OnSelectedIndexChanged="rblScore_IndexChanged" AutoPostBack='<%#Eval(chkAutoSave.Checked.ToString()) %>'></asp:RadioButtonList>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
我收到错误:DataBinding: 'System.Data.DataRowView'
不包含名称为 的属性True
。是否可以这样做,还是我需要在 内这样做ItemDataBound
?