3
Answers

grid view error

Safeer Safeer

Safeer Safeer

11y
959
1
here it is the code in grid


                    </ul>
                    <asp:GridView ID="gvdivision" runat="server" AutoGenerateColumns="False"
                        DataKeyNames="divisionId" DataSourceID="SqlDataSource1"
                        OnDataBinding="gvdivision_DataBinding"
                        onselectedindexchanged="gvdivision_SelectedIndexChanged1">
                        <Columns>
                            <asp:BoundField DataField="divisionId" HeaderText="divisionId"
                                InsertVisible="False" ReadOnly="True" SortExpression="divisionId"
                                Visible="False" />
                            <asp:TemplateField HeaderText="Class Name">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("className") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Division Name">
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("divisionName") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:CommandField ButtonType="Button" HeaderText="Edit"
                                ShowCancelButton="False" ShowEditButton="True" ShowHeader="True">
                                <FooterStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:CommandField>
                            <asp:CommandField ButtonType="Button" HeaderText="Select" ShowHeader="True"
                                ShowSelectButton="True" />




Answers (3)