How Design Bootstrap Layout.

Posted by Jayakumars under C# on 5/20/2016 | Points: 10 | Views : 1443 | Status : [Member] [MVP] | Replies : 2
Hi

I have images in my Database.
Now i using Gridview for image binding working good.

But i need how to bind Gridview with Bootstrap layout binding from DB Records.

Mark as Answer if its helpful to you

Kumaraspcode2009@gmail.com



Responses

Posted by: Manideepgoud on: 5/20/2016 [Member] Starter | Points: 25

Up
0
Down
Dear Jayakumar
To create grid view, please visit the below link
http://techfunda.com/howto/603/responsive-layout

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: A2H on: 5/20/2016 [Member] [MVP] Silver | Points: 25

Up
0
Down
If you want to apply bootstrap styles to Gridview then you can use any styles for table. Reason is Gridview will render as table at runtime so bootstrap style for table can be applied to gridview.

Sample Code

<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet" type="text/css" />

<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<div class="table-responsive">
<asp:GridView ID="GridView2" runat="server" CssClass="table table-bordered" AutoGenerateColumns="False" DataSourceID="SqlDataSource2">
<Columns>
<asp:BoundField DataField="City" HeaderText="City" />
<asp:TemplateField HeaderText="StateProvinceID">
<ItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%#Bind ("ID") %>'></asp:TextBox>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
</asp:GridView>

</div>


Notice the css CssClass="table table-bordered" applied to table.This is a bootstrap style for table. You can have any other styles like styles with alternate colors etc

Thanks,
A2H
My Blog

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response