我需要在网格视图中以图像中附加的确切格式显示我的数据。除了“插入”按钮之外,我还有其他所有功能。此按钮将出现在同一焦点区域的最后一行,即如果我有两行焦点区域为“客户端”,则插入行按钮将出现在第二行而不是所有行。 1
任何帮助都将受到高度赞赏。
谢谢!
<asp:GridView ID="grdMBO" runat="server" AutoGenerateColumns="false" OnRowDataBound="grdMBO_RowDataBound"
OnRowCommand="grdMBO_RowCommand" DataKeyNames="ID">
<Columns>
<asp:TemplateField HeaderText="ID">
<ItemTemplate>
<asp:Label ID="lblMBOID" runat="server" Text='<%# Eval("MBOToolID") %>'></asp:Label>
<asp:Label ID="lblID" runat="server" Text='<%# Eval("ID") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Performance Focus Area">
<ItemTemplate>
<asp:TextBox ID="txtFocusArea" Text='<%# Eval("PerformanceFocusArea") %>' Visible="false"
runat="server"></asp:TextBox>
<asp:DropDownList ID="drpFocusArea" runat="server">
<asp:ListItem Value="Client"></asp:ListItem>
<asp:ListItem Value="Commercial Management"></asp:ListItem>
<asp:ListItem Value="Ideas"></asp:ListItem>
<asp:ListItem Value="People"></asp:ListItem>
<asp:ListItem Value="Specific and Unique Capabilities"></asp:ListItem>
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="In Year or Multi Year">
<ItemTemplate>
<asp:Label ID="lblYearSelected" Visible="false" runat="server" Text='<%# Eval("SelectedYear") %>'></asp:Label>
<asp:RadioButtonList ID="radGoals" runat="server">
<asp:ListItem Text="In Year" Value="1"></asp:ListItem>
<asp:ListItem Text="Multi Year" Value="2"></asp:ListItem>
</asp:RadioButtonList>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Goal**">
<ItemTemplate>
<asp:TextBox ID="txtComments" runat="server" TextMode="MultiLine" Text='<%# Eval("AnnualGoal") %>'
Rows="5" Width="250px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Goal Team" HeaderStyle-Width="500px">
<ItemTemplate>
<table width="100%">
<tr>
<td style="width: 45%" valign="top">
<i>Please enter name & wait for Auto-Suggestion</i>
<asp:TextBox ID="txtName" Width="80%" runat="server"></asp:TextBox>
<cc1:AutoCompleteExtender ID="autoComp" runat="server" MinimumPrefixLength="2" TargetControlID="txtName"
ServiceMethod="GetNames" CompletionListCssClass="AjaxRecordDisplay" CompletionListHighlightedItemCssClass="AjaxHighlightRecord"
CompletionListItemCssClass="AjaxItemDisplay" Enabled="true" ServicePath="WebService.asmx">
</cc1:AutoCompleteExtender>
</td>
<td style="width: 10%">
<%-- <input type="button" id="btnSelectName" runat="server" value=">>" />--%>
<asp:Button ID="btnSelectName" runat="server" Text=">>" />
</td>
<td style="width: 45%">
<asp:ListBox ID="lstSelectedName" Width="80%" runat="server"></asp:ListBox>
<asp:HiddenField ID="hdnSelectedName" runat="server" />
<i>(Double click to remove name)</i>
</td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="TT Feedback">
<ItemTemplate>
<asp:TextBox ID="txtTTComments" runat="server" TextMode="MultiLine" Rows="5" Width="250px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Action">
<ItemTemplate>
<asp:ImageButton ID="imgAdd" runat="server" Width="20px" CommandArgument='<%#DataBinder.Eval(Container,"DataItem.ID") %>'
CommandName="Add" Height="20px" ImageUrl="~/Layout/Images/Add.jpg" />
<%-- <asp:ImageButton ID="imgDelete" runat="server" Width="20px" Height="20px" ImageUrl="~/Layout/Images/Delete.jpg" />--%>
<img src="~/Layout/Images/Delete.jpg" id="imgDelete" style="height: 20px; width: 20px;
cursor: pointer" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>