我目前有一个RadGrid,它支持两个插入。一个用于服务,另一个用于物品。这些项目在服务之内。
我试图在插入5个服务并且为特定服务插入10个项目时显示一条消息。
我该如何实现?我愿意使用Java客户端或C#来处理它。
谢谢!
<table align="left" cellpadding="0" cellspacing="0" class="Standard" style="" width="750px">
<tr>
<td colspan="2" style="width: 99%">
<telerik:RadGrid ID="gvServices" runat="server" AllowSorting="true" AllowPaging="true" DataSourceID="dsSections" AllowFilteringByColumn="true" PageSize="200"
AllowNaturalSort="False" AllowAutomaticInserts="true" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true"
ShowStatusBar="true" RowStyle-CssClass="GridViewRowStyle" AlternatingRowStyle-CssClass="GridViewAlternatingRowStyle" Width="750px"
OnInsertCommand="gvServices_InsertCommand" AllowMultiRowSelection="False" AutoGenerateColumns="false" OnUpdateCommand="gvServices_UpdateCommand"
OnItemDataBound="gvServices_ItemDataBound">
<GroupingSettings CaseSensitive="false" />
<PagerStyle Mode="NextPrevAndNumeric" />
<MasterTableView AutoGenerateColumns="False" DataKeyNames="iSectionID" DataSourceID="dsSections" CommandItemDisplay="Top">
<DetailTables>
<telerik:GridTableView DataKeyNames="iItemID" DataSourceID="dsItems" Width="100%" runat="server" CommandItemDisplay="Top" Name="gvItems"
AllowAutomaticInserts="true" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="iSectionID" MasterKeyField="iSectionID" />
</ParentTableRelation>
<Columns>
<telerik:GridBoundColumn DataField="iItemID" HeaderText="iItemID" SortExpression="iItemID" UniqueName="iItemID" Visible="false" ReadOnly="true" />
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
<ItemStyle CssClass="MyImageButton" />
</telerik:GridEditCommandColumn>
<telerik:GridButtonColumn ConfirmText="Delete this Section?" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="delSection" />
<telerik:GridBoundColumn DataField="iSectionID" HeaderText="iSectionID" SortExpression="iSectionID" UniqueName="iSectionID" ReadOnly="true" Visible="false" />
<telerik:GridBoundColumn DataField="ItemName" HeaderText="ItemName" MaxLength="100" SortExpression="ItemName" UniqueName="ItemName" />
<telerik:GridBoundColumn DataField="ItemDescription" HeaderText="ItemDescription" MaxLength="1000" SortExpression="ItemDescription" UniqueName="ItemDescription" />
<telerik:GridBoundColumn DataField="ItemPrice" HeaderText="ItemPrice" SortExpression="ItemPrice" UniqueName="ItemPrice" />
<telerik:GridCheckBoxColumn DataField="bIsEnabled" HeaderText="bIsEnabled" SortExpression="bIsEnabled" UniqueName="bIsEnabled" />
</Columns>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
<ItemStyle CssClass="MyImageButton" />
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="iSectionID" HeaderText="iSectionID" SortExpression="iSectionID" UniqueName="iSectionID" ReadOnly="true" Visible="true" />
<telerik:GridBoundColumn DataField="SectionName" HeaderText="SectionName" SortExpression="SectionName" MaxLength="150" UniqueName="SectionName" />
<telerik:GridBoundColumn DataField="SectionDescription" HeaderText="SectionDescription" SortExpression="SectionDescription" MaxLength="4000" UniqueName="SectionDescription" />
<telerik:GridCheckBoxColumn DataField="bIsEnabled" HeaderText="bIsEnabled" SortExpression="bIsEnabled" UniqueName="bIsEnabled" />
<telerik:GridBoundColumn DataField="iMemberID" HeaderText="iMemberID" SortExpression="iMemberID" UniqueName="iMemberID" ReadOnly="true" Visible="true" />
</Columns>
</MasterTableView>
</telerik:RadGrid>
</td>
</tr>
</table>