I am interested in incorporating a vertical scrollbar into a gridview in ASP.NET

I've successfully bound data to a grid view in my ASP.NET application. I've implemented pagination, but instead of that, I'd like to incorporate a scroll bar to prevent lengthy paging.

Below is the code for my grid view:

<div class="box-content" style="min-height: 170px">
<asp:GridView ID="gvVenFileQA" runat="server" AutoGenerateColumns="False" 
EnableModelValidation="True"
ShowHeader="true" Width="100%" CssClass="altrowstable" AllowPaging="true" 
EmptyDataText="No Data Available !"
PageSize="5" OnPageIndexChanging="gvVenFileQA_PageIndexChanging" 
OnRowDataBound="gvVenFileQA_RowDataBound"
OnSelectedIndexChanged="gvVenFileQA_SelectedIndexChanged" 
DataKeyNames="ID,RUN_ID">
<Columns>

I'm looking to implement scrolling within the bound data section, not on the outer <div> tag. Any suggestions would be appreciated.

Answer №1

Styling with CSS:

.section-content { height: 200px; overflow-y: scroll; }

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Obtain the 2D coordinate perimeter of an area within an image (like a specific country on a map)

Is there a way to generate the 2D coordinates for a specific area of an image, such as a single country on a map, so that it can be highlighted on a canvas of the same size? If so, how would I go about obtaining these coordinates? My goal is to create int ...

Divs with floating left have a complete vertical border on their right side

I would like the first and second divs to have a full height border on their right side while floating left. CSS: div.wrapper { border: 1px solid black; } div.wrapper > div { text-align: center; width: 50px; padding-left: 5px; fl ...

Populating a ListView in Xamarin Forms with your own data - a step-by-step guide!

Process: Step 1: Choose your desired item from the Food menu, and tapping it will display a quantity popup. Preview of OrdernowMenu.xaml https://i.sstatic.net/qqPUD.jpg Link:https://i.sstatic.net/qqPUD.jpg OrdernowMenu.xaml <ContentPage.Toolbar ...

problem with html tags

I've been attempting to customize an input field using inline styles, but I'm running into issues. Here's what I tried: <div class="row vh-md-100"> <div class="col-md-7 my-md-auto text-center text-md-left"> ...

Steps to Decode JSON in C#

I have limited experience in c# programming, but I am well-versed in Object-Oriented Programming with PHP and Java. In my current c# code, I am working with a HTTP web response that returns a JSON object. While I have researched various articles and Micros ...

Issue with Angular 6 Animation not showing up

Looking to incorporate an animation spinner into my Angular app Found this spinner example: https://codepen.io/z-/pen/OPzNLz spinner.component.html import { Component, OnInit } from '@angular/core'; @Component({ selecto ...

What method can be used to obtain a parallel vector on a plane that has been struck by an intersecting ray?

Issue at hand: https://i.sstatic.net/H5g5M.jpg Given parameters: intersect, n, p. With p representing a random point in the space, and N as the normal of the plane. Desired result: w Approach attempted in my shader code: "vec3 n = normalize(faceNormal ...

Retrieving the background image URL from inline CSS using jQuery

I'm looking for a link similar to url(img/bg/06.jpg), but when using jQuery, I get a longer link like url("file:///D:/WORKING%20FILE/One%20Landing%20Page/version/img/bg/06.jpg") https://i.stack.imgur.com/8WKgv.png Below is the code snippet in questi ...

Move the DIV element to a static section within the DOM

In my Vue app, I have implemented methods to dynamically move a DIV called 'toolbox' to different sections of the DOM. Currently, the DIV is positioned on the bottom right of the screen and remains static even when scrolling. My goal is to use t ...

Why is it not possible for me to place my image and text side by side?

I've been working on my personal portfolio website and ran into an issue when trying to position the image with text that says Ib student. I attempted using the bootstrap box model which didn't work, followed by using float, but that also didn&ap ...

Ensuring the correct width for a .png image in an email newsletter for Outlook 2013

After creating an email newsletter that works perfectly on all email clients except Outlook 2013, I realized that the image I included is not adhering to the table width specified. Instead, it is defaulting to its own width of 658px. View image here Below ...

Utilize LI styling exclusively for a specific section of the website

Is it possible to style LI items with padding and bullet points only when they are inside the <div class="article-content"> element without affecting other ul/li styles on the website such as the navigation menu? Thank you for your help! .article-co ...

Examining the false positive detection of an apparent visibility issue with

My goal is to check if the document is NOT scrollable using this code snippet: $el = document.documentElement const noscroll = $el.clientHeight === $el.scrollHeight // false console.log($el.clientHeight) // 977 console.log($el.scrollHeight) // 991 consol ...

Struggling to align menu items horizontally with CSS? Using the inline property just isn't cutting it

I'm struggling to get my menu to display horizontally, no matter what I try. What am I doing wrong? I think the issue might be with the inline option, but I'm not certain. If someone could help correct my code, I would be very grateful. Thank you ...

Reset input fields while retaining placeholder text

Seeking advice on how to use this handy jQuery tool properly: $('.myDiv input').each(function () { $(this).val(""); }); Though it clears my form, I'm struggling to maintain the placeholders of the inputs. Any suggestions? C ...

How can I show or hide all child elements of a DOM node using JavaScript?

Assume I have a situation where the HTML below is present and I aim to dynamically conceal all the descendants of the 'overlay' div <div id="overlay" class="foo"> <h2 class="title">title</h2> ...

Using Flexbox for laying out content in both columns and rows

Hey there, I'm looking for a little help. It's been quite some time since I last built a website from scratch and I want to keep things simple this time around. I've used breakpoints before, but I'm curious if Flexbox could be a better ...

Preventing users from clicking on links unless they double click by using CSS rotation

I'm struggling to figure out why only the white portion of my links is clickable. The links are designed as "3D" buttons using CSS rotate transitions, but I can't seem to fix the issue. Any assistance would be greatly appreciated! Check out the ...

What steps do I need to take to authenticate a SignalR Hub with Azure Mobile Apps authentication?

My mobile app uses Facebook Auth via Azure for authentication. The Auth works well for the ApiControllers with the [MobileApiController] flag. However, I am struggling to authorize my SignalR Hub - the Authorize attribute is blocking user access. The reso ...

Press one button to activate another button

I am looking to activate a button's class by clicking on another button. The button I have is: <button class="clear-cart banner-btn">clear cart</button> This button is used for clearing a cart. On the order confirmation page, I click on ...