使用<rad:GridBoundColumn HeaderText="Capability" UniqueName="ClmCapability" DataField="cap_name" />
.
注意:替换<rad:
为注册时用于 RadGrid 控件的前缀。您可以在以下位置找到它作为TagPrefix:
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
你不能使用asp:boundfield
,因为它是用于 asp.net gridview,而你正在使用 telerik radgrid
编辑 :
<rad:RadGrid ID="MyRadGrid" runat="server" EnableAJAXLoadingTemplate="true"
AutoGenerateColumns="false" AllowFilteringByColumn="True" AllowPaging="True"
AllowSorting="True" GridLines="None" Width="60%" EnableAJAX="True" OnNeedDataSource="MyRadGrid_NeedDataSource">
<ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
</ClientSettings>
<MasterTableView RetrieveAllDataFields="false" AdditionalDataFieldNames="Name">
<PagerStyle AlwaysVisible="false" Mode="NextPrevNumericAndAdvanced" ShowPagerText="true" />
<Columns>
<rad:GridBoundColumn HeaderText="Capability" UniqueName="ClmCapability" DataField="cap_name" />
</Columns>
</MasterTableView>
</rad:RadGrid>