我正在使用 Telerik RadGrid,我正在做客户端数据绑定。这是我的网格:
<telerik:RadGrid ID="radGrid_Assignments" runat="server" AllowPaging="True" AutoGenerateColumns="false"
AllowSorting="true" AllowFilteringByColumn="true" >
<PagerStyle Mode="NextPrevAndNumeric" />
<MasterTableView NoMasterRecordsText="No assigments found for the search criteria.">
<Columns>
<telerik:GridHyperLinkColumn HeaderText="Customer Name" DataTextField="CustomerName" Target="_customer"
DataNavigateUrlFormatString="~/Modules/DataEntry/ProviderContact/Edit.aspx?id={0}"
DataNavigateUrlFields="CustomerID" SortExpression="cust.Name" UniqueName="cust.Name"
HeaderStyle-Width="200px" />
<telerik:GridBoundColumn DataField="JobTitle" HeaderText="Title" HeaderStyle-Width="250px" />
<telerik:GridBoundColumn DataField="ProviderName" HeaderText="Provider" HeaderStyle-Width="250px" />
<telerik:GridHyperLinkColumn DataNavigateUrlFields="SurveyType,EvaluationID,SurveyID" DataNavigateUrlFormatString="~/Modules/AssignmentPortal/Evaluation/Enter{0}.aspx?EvalID={1}&sid={2}&menu=false" DataTextField="SurveyName" HeaderStyle-Width="200px" HeaderText="Survey Name" SortExpression="s.Description" Target="_survey" UniqueName="s.Description" />
<telerik:GridBoundColumn DataField="ProductName" HeaderText="Product" HeaderStyle-Width="150px" />
<telerik:GridBoundColumn DataField="WorkPhone" UniqueName="cust.WorkPhone" SortExpression="cust.WorkPhone" HeaderText="Work Phone"
HeaderStyle-Width="150px" />
<telerik:GridHyperLinkColumn HeaderText="Email" DataTextField="Email" UniqueName="cust.Email"
DataNavigateUrlFormatString="mailto:{0}" DataNavigateUrlFields="Email" SortExpression="cust.Email"
HeaderStyle-Width="300px" />
<telerik:GridBoundColumn DataField="NoteDateTime" HeaderText="Last Note Date" DataFormatString="{0:MM/dd/yyyy hh:mm tt}"
HeaderStyle-Width="150px" />
<telerik:GridBoundColumn DataField="NoteText" HeaderText="Last Note" UniqueName="cln.NoteText"
HeaderStyle-Width="400px" />
</Columns>
</MasterTableView>
<ClientSettings>
<DataBinding Location="/AjaxServices/SearchService" SelectMethod="GetAssignmentsSearchResults" />
<ClientEvents OnCommand="showLoadingPanel" OnDataBound="OnClientDataBound" OnDataBinding="OnClientDataBinding" />
</ClientSettings>
</telerik:RadGrid>
当 SpatialCoordinatesKLASID 的 DataNavigateUrlFields 为 NULL 时,我希望能够使用 HeaderText="KLAS Maps" 隐藏 GridHyperLinkColumn。我只想要一个空列。
我不能使用传统方式使用服务器端 OnItemDataBound 事件。因为这是在客户端加载的。
我怎样才能做到这一点?预先感谢您的帮助。