Results 1 to 1 of 1

Thread: Bootstrap + Gridview -- cannot get working

  1. #1
    Junior Member
    Join Date
    Feb 2017
    Posts
    1

    Bootstrap + Gridview -- cannot get working

    I have figured out about Layout Grids using Bootstrap, but I am having problems getting a Gridview to work.

    Within my HTML I have used Section Groups & Col's to layout my overall page.
    Within the bottom Section Group I want to put a Gridview and have it populated by a pre-defined ObjectDataSource

    Bootstrap Page Layout.jpg

    I have found a number of website references and tried them all (so far) and could not get any of them to work.

    My most recent attempt (using footable) is:
    HTML
    <asp:GridView ID="GridView1" CssClass="footable" runat="server" AutoGenerateColumns="False"
    Style="max-width: 500px" DataSourceID="ObjectDataSource1">
    <%-- followed by all of the discrete column definitions --%>

    CSS
    I have Included the footable.bootstrap.css & footable.bootstrap.min.css into the project
    And in the <head> I have
    <link href="content/css/footable.bootstrap.css" rel="stylesheet" type="text/css" />

    JS
    I have included <script src="Scripts/footable.js"></script> into the project

    But when I attempt to run the page I get the following:
    Control 'ContentPlaceHolder1_GridView1' of type 'GridView' must be placed inside a form tag with runat=server.
    NOTE - the entire Bootstrap Layout Grid is within a Form with runat=server
    And that includes the area where I am trying to put the Gridview

    Any advice and/or suggestions (including possibly dumping the footable approach) would be greatly appreciated.

    Thanks
    Last edited by jrbbldr; 02-08-2017 at 10:55 PM. Reason: to attach page layout image

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •