没有啊!
我是直接绑定的数据原 是根据id 删除的。
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataKeyNames="CId" DataSourceID="ObjectDataSource1" CellPadding="4"
ForeColor="#333333" GridLines="None" Width="100%">
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#EFF3FB" />
<Columns>
<asp:BoundField DataField="CId" HeaderText="序号" SortExpression="CId" />
<asp:BoundField DataField="Ccode" HeaderText="编号" SortExpression="Ccode" />
<asp:BoundField DataField="Cname" HeaderText="名称" SortExpression="Cname" />
<asp:BoundField DataField="Caddress" HeaderText="地区" SortExpression="Caddress" />
<asp:TemplateField HeaderText="客户经理">
<EditItemTemplate>
<asp:TextBox ID="TextBox4" runat="server" Height="25px" Width="98px"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("LinkManInfo.lname") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="客户等级">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Eval("Ustateid.name") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Ustateid.name") %>'></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
</Columns>
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DataObjectTypeName="Model.Client" DeleteMethod="DeleteClient"
SelectMethod="GetAllClient" TypeName="BLL.ClientManger"
UpdateMethod="UpdateClient">
<DeleteParameters>
<asp:Parameter Name="cid" Type="Int32" />
</DeleteParameters>
</asp:ObjectDataSource>