我对组件艺术网格有疑问。
有人在努力选择你的attribite为AllowMultipleSelect =" false"但您仍然可以选择多行。
我似乎无法解决这个问题,因为我只希望所选行突出显示所选颜色为selectedRowCssClass颜色。
这是我的前端代码:
<%@ Register Assembly="ComponentArt.Web.UI" Namespace="ComponentArt.Web.UI" TagPrefix="ComponentArt" %>
<!DOCTYPE html>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<base target="_self" />
<title>iView Trend Data</title>
<link href="Assets/OldCss/gridStyle.css" rel="stylesheet" />
</head>
<body>
<form id="form1" runat="server">
<asp:HiddenField ID="ParamA" runat="server" />
<asp:HiddenField ID="ParamB" runat="server" />
<table style="width:100%; Height:100%;" >
<tr>
<td>
<ComponentArt:CallBack id="CallBack1" CacheContent="false" width="100%" Height="100%" runat="server">
<Content>
<ComponentArt:Grid ID="Grid1"
CssClass="Grid"
runat="server"
RunningMode="Client"
ShowFooter="false"
ImagesBaseUrl="~/Assets/Image/Grid/"
Sort="DateTime"
ScrollBar="Auto"
ScrollTopBottomImagesEnabled="true"
ScrollTopBottomImageHeight="2"
ScrollTopBottomImageWidth="16"
ScrollImagesFolderUrl="~/Assets/Image/Grid/"
ScrollButtonWidth="16"
ScrollButtonHeight="17"
ScrollBarCssClass="ScrollBar"
ScrollGripCssClass="ScrollGrip"
ScrollBarWidth="16"
ScrollPopupClientTemplateId="ScrollPopupTemplate"
Width="760"
Height="618"
AllowTextSelection="false"
AllowHorizontalScrolling="True"
AllowMultipleSelect="false"
PageSize="30"
ShowHeader="true"
ShowSearchBox="true"
SearchOnKeyPress="true"
Visible="true"
AllowVerticalScrolling="False"
GroupingNotificationText="">
<Levels>
<ComponentArt:GridLevel
DataKeyField="DateTime"
ShowTableHeading="False"
ShowSelectorCells="False"
HeadingCellCssClass="HeadingCell"
HeadingCellHoverCssClass="HeadingCellHover"
HeadingCellActiveCssClass="HeadingCellActive"
HeadingTextCssClass="HeadingCellText"
DataCellCssClass="DataCell"
RowCssClass="DataRow"
SelectedRowCssClass="SelectedRow"
SortAscendingImageUrl="asc.gif"
SortDescendingImageUrl="desc.gif"
ColumnReorderIndicatorImageUrl="reorder.gif"
SortedDataCellCssClass="SortedDataCell"
SortImageWidth="14"
SortImageHeight="14"
AllowGrouping="false"
AlternatingRowCssClass="AlternatingRow">
<Columns>
<ComponentArt:GridColumn DataField="DateTime" Width="100" FormatString="yyyy-MM-dd HH:mm" Visible="false"/>
</Columns>
</ComponentArt:GridLevel>
</Levels>
<clienttemplates>
<ComponentArt:ClientTemplate Id="ScrollPopupTemplate">
<table cellspacing="0" cellpadding="2"
border="0" class="ScrollPopup">
<tr>
<td style="width:50px;">
<div style="font-size:10px;font-family:MS Sans Serif; text-overflow:ellipsis; overflow:visible;">
<nobr>## DataItem.GetMember("DateTime").Text ##</nobr>
</div>
</td>
</tr>
</table>
</ComponentArt:ClientTemplate>
</clienttemplates>
</ComponentArt:Grid>
</Content>
<LoadingPanelClientTemplate>
<table width="100%" align="center" style="position:relative;top:250px">
<tr>
<td style="color:#cee820" align="right">Loading..</td>
<td align="left"> <img src="./images/ajax-loader.gif" width="48" height="48" border="0"/></td>
</tr>
</table>
</LoadingPanelClientTemplate>
</ComponentArt:CallBack>
</td>
</tr>
</table>
</form>
</body>
</html>
&#13;
答案 0 :(得分:0)
我遇到了类似的问题,原因是因为DataKeyField的值中包含空格。