Make GridView Responsive when screen becomes smaller using jQuery in ASP.Net

anjali600
 
on Sep 16, 2021 03:22 AM
367 Views

I have a gridview on my web page. When I make the screen smaller, half of the gridview is going beyond the page.

below is my code:

<div style="margin-left:25%;">
<asp:GridView RowStyle-Wrap="false"  ID="grdCalculate"  runat="server" GridLines="Horizontal" CssClass="grid" OnRowDataBound="grdCalculate_RowDataBound" class="table table-responsive" >
</asp:GridView>

how can I make the grid responsive. I am already using the jquery plugin like so on my master page:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="Scripts/jquery-responsiveTables.js"></script>

The above script tags are not making any difference to the responsiveness of the gridview.

any help will be greatly appreciated.

Download FREE API for Word, Excel and PDF in ASP.Net: Download