.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

DataGridView - Increase max scroll value

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :Windows Application

I created a control that inherits from DataGridView so that a footer can be added after the last row. The additional row is just painted in the overridden OnPaint method. It works great except for when there are too many rows to fit in the bounds of the control. I have a vertical scroll bar and when I scroll to the bottom it still cuts off my footer. Is there a way to get the DataGridView to scroll beyond the last row? I tried to set the DataGridView.VerticalScrollBar.Maximum property equal to the max + my additional space but that didn't not work.

Using VS2008 .NET 3.5.

View Complete Post

More Related Resource Links

adding scroll bar & increase the size of form

I'm using visual basic in visual studio 2010. I am a begining designer.
I created several columns in form. In columns there are many textboxes for input.
I like to create a scroll bar in each column, but i don't know how to create it.
Also Can I increase the size of form since I need to put lots of textboxes

Custom Editing Behavior for DataGridView TextBox Columns

For various reasons I'm using a DataGridView instead of a ListView, and while configuring the DataGridView to look like a ListView wasn't much of a problem, there's one thing that got on my nerves, which is the behavior of textbox cells in edit mode: It is much too easy to leave the edit mode accidentally, simply by pressing the cursor keys at the wrong time. For example when the text caret is positioned behind the last character of the textbox cell content, and you press the right arrow key

AutoCompleteStringCollection for text box in DataGridView 2.0

I have been searching for a way to have autocomplete in a DataGridTextBox
object. There does not appear to be an obvious way to do this like you would
for a TextBox outside of a grid using the AutoCompleteCustomSource. Any
thoughts on how I can add this collection? :)

how to increase Performance onloading page and navigation of records ?? Help








this is my aspx and cs code , let me know whether it is correct or not??

onload and performance on navigation of record show be good.

Plz help me

<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True"

                DisplayGroupTree="False" ReuseParameterValuesOnRefresh="true" HasToggleGroupTreeButton="False" Height="1039px" ReportSourceID="CrystalReportSource1"

                Width="901px" />

            <CR:CrystalReportSource ID="CrystalReportSource1" runat="

Basic Instincts: Increase LINQ Query Performance


Jared Parsons demonstrates a technique to achieve maximum performance from LINQ queries on large sets of data in order to create a responsive user interface.

Jared Parsons

MSDN Magazine August 2008

Dev Q&A: DataGridView


After receiving a late-breaking news bulletin at magazine headquarters early this month stating that the Web is just a fad that will never amount to anything, we have reluctantly decided to retire our venerable Web Q&A column and replace it with one we like to call Dev Q&A.

Edited by Nancy Michell

MSDN Magazine January 2006

Web Services: Increase Your App's Reach Using WSDL to Combine Multiple Web Services


The very tools that have helped drive the growing adoption of Web services, and the enabling abstractions that they provide, can often prevent developers from peeking behind the curtains at the XML standards that make up the Web services stack. This article will offer a solution that enables type sharing between proxies created for complementary Web services, while at the same time providing an opportunity to examine the Web Services Description Language (WSDL) and its interaction with the Web services tools you know and love.

Gerrard Lindsay

MSDN Magazine March 2005

setting scroll position for a ListBox


I have a ListBox control showing 10 rows.  I have 30 rows total in the listbox.  How do I programmatically adjust the scroll to show the last ten rows?

Some sources have suggested that I set the SelectedItem.  But I am already making selections (myListBox.Items[28].Selected = true, myListBox.Items[29].Selected = true, etc); the listbox scroll is positioned on Item[0] not the first selected item.  I have also tried setting myListBox.SelectedItem in addition to the multiple selection just mentioned but that does not have any affect either.


How to make browser scroll to the bottom of page


Hi All,

  How to use asp.net C# to scroll to the bottom on page on post back or programmatically decision? 

Session Timeout increase to 2 hours.



    for Business needs i am planning to increase the session timeout to 2 hours(120 min) in one application, i am using sql server session state. if i increase to 2 hours of session time out, how it will effect the performance of application and web server.

   Could any one help me on this.






How I disable vertical scroll bar of report viewer control on Web Form.


I'm displaying .rdlc report file using Report viewer control on Webform. If  I Fix height of viewer control and data is not same as to size of viewer control then it display one scrollbar on viewer control and second vertical scroll bar is coming on webpage.

 I want to off viewer vertical scrollbar or in simple word's I don't want to display two scroll bar with my report. Please guide me or send me reference if any.


datagridview row selection and coloring.

HI !I am a novice in C#.net. I have a datagridview on my form. I want to change the row color by rolling over the mouse on the row not by clicking on the row and when mouse mouse leave the row then the row color is back to the original color. I want to know that which event should i use?any help would be appriciated.

Text in Datagridview-Zelle unterschiedlich einfärben

Hallo zusammen, wie kann ich einen Text in einer Zelle unterschiedlich einfärben ? Wenn in der Zelle z.B."4711/ART" steht, dann möchte ich "ART" rot einfärben. Es geht also darum, einen Teil des Zellinhaltes farblich hervor zu heben. Gruß jogi

distinct datagridview

how can i select distcint from datagridview

DataGridView>Edit Columns> Column Read Only property is unwilling to change

Hello, I am facing the following mystery: When changing the read only property of a column to false and reopening the "edit columns" window, it mysteriously turns back to true. Even when closing the designer and changing it in the designer code, the resulting execution does not allow edit, as well as when re-opening the designer you see true again.             this.numberDataGridViewTextBoxColumn1.DataPropertyName = "Number";             this.numberDataGridViewTextBoxColumn1.HeaderText = "Number";             this.numberDataGridViewTextBoxColumn1.Name = "numberDataGridViewTextBoxColumn1";             this.numberDataGridViewTextBoxColumn1.ReadOnly = true;//False is required We thought it might be related to data binding. rebinding the grid did not help as well. The is no other place in the code where it changes. Please advice, Thanks

Moving Datarow from datagridview to textboxes

Hi , I need to know how to copy a datarow from datagridview to subsequent textboxes.I have three textboxes and three fields in datagridview .
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend