MyException - 我的异常网
当前位置:我的异常网» ASP.NET » 在gridview中编辑记录,怎么利用ObjectDataSource更

在gridview中编辑记录,怎么利用ObjectDataSource更新(2)

www.MyException.Cn  网友分享于:2013-02-20  浏览:61次

                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("UnitName") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="排序" SortExpression="SortIndex">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox2" Width="30px" runat="server" Text='<%# Bind("SortIndex") %>'></asp:TextBox>
                                    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="TextBox2"
                                        ErrorMessage="*" ForeColor="Red" Operator="DataTypeCheck" Type="Integer">*</asp:CompareValidator>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("SortIndex") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:CommandField ShowEditButton="True" />
                                                   </Columns>

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有