Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > How do I display specific numbers of rows at a time in a DataGridView?
 

How do I display specific numbers of rows at a time in a DataGridView?

How do I display specific numbers of rows at a time in a DataGridView?

Hi All

I want to display 20 rows of data at a time in a datagridview, and have the user click Next (btnNext) to get the next 20 rows and so fore.

I have setup the DefaultView.RowFilter etc (sample shown below). The problem is that some of the database has over 3000 records and takes a lifetime to open. Please note that the DataGridView is bound to a datatable and I get an error if I use the RowCount.*** etc

Any Ideas

Thanks

John

Call Resetsource1()

Dim NewSortBy As String

ColumnData1 = "[" & ColumnData1 & "] = '"

CellData1 = CellData1 & "'"

NewSortBy = ColumnData1 & CellData1 ' "[Group1] = 'File.txt'"

frmMainExplorer.BackupDataSet1.Tables("BackupDatabase").DefaultView.RowFilter = NewSortBy

Hoe

JGalvinBackupEarth  Sunday, October 28, 2007 10:50 AM
Ken Tucker  Sunday, October 28, 2007 11:04 AM
Ken Tucker  Sunday, October 28, 2007 11:04 AM

Thanks Ken that hit the nail on the head cheer!!

A Happy programmer... well for a while anyway

JGalvinBackupEarth  Sunday, October 28, 2007 1:52 PM

You can use google to search for other answers

Custom Search

More Threads

• Database Connection
• Filter a datagridview from another form
• Global connection
• Grouping Question??
• GridView and Dropdownlist issues or bug?
• Radiobutton in Datagridview control
• ADO connection to Sybase 12
• Datagridview event handling
• Performance problem. How to clean up Dataset ?
• Navigating to a parent in a databinding expression