473,386 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to show 10 next records on DataGrid ?

I let DataGrid show 10 items each time loading.When I click the lastest item in those 10 items , DataGrid will be databinded with 10 next items in my database.But I don't know how to do it ! Help me please .Thanks a lot.
Jan 11 '08 #1
2 1739
Plater
7,872 Expert 4TB
DataGrid or DataGridView? (or GridView?)
If you have a DataSet with all your data, you can keep track of the row index you are at keep making smaller DataSet's that only have collections of 10 rows in them?
Jan 11 '08 #2
DataGrid or DataGridView? (or GridView?)
If you have a DataSet with all your data, you can keep track of the row index you are at keep making smaller DataSet's that only have collections of 10 rows in them?
I use DataGrid of VS 2003.I have already done a store procedure to databind DataGrid with it.It like below :

CREATE PROCEDURE Test8
@count int
AS
declare @sql nvarchar(255)
set @sql= 'select top 10 * from tblBaiHat where LuotNghe not in (select top ' + cast(@count as varchar(50)) + ' LuotNghe from tblBaiHat order by LuotNghe desc) order by LuotNghe desc'
execute(@sql)
GO

I am going to make a DataSet with this store procedure. @count is set to 10,20,30....to get 10 rows each time.
This store procedure is only get 10 rows each time to databind for DataGrid.But how can I resolve the event of click on the lastest item of DataGrid to databind 10 next rows for DataGrid ?
Jan 12 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ioannis Demetriades | last post by:
Hi, I am doing a VB.NET application with SQL Server 2000 and I need to implement a database search facility that will normally return lots of records. Those records will then be displayed in a...
0
by: Tom Kaminski [MVP] | last post by:
I want to show a table of master records, with the right most column displayed as a comma (or space) delimited list of details. The practical application of this is a thesaurus, where the master...
3
by: jcfilth | last post by:
Hello, I have created an asp.net web page with 3 datagrids. Every datagrid binds to a diferent sql query, against a sql server. I first bind one, then the other and then the last, all using code...
1
by: David | last post by:
What I envision is this. The user gets a set of records in a data grid Then the user gets to select one of the rows to view the detail information about the record. Then instead of backing...
3
by: Darren | last post by:
Dear Groups I've used paging with a datagrid in C# at least a hundred times, but for whatever reason, I cannot get the prev /next to appear as links. It is absolutely certain that the number of...
1
by: Randall Parker | last post by:
Title says it all. Using ASP.Net v1.1. Want to show some message when there are no records to show in a grid. Does one do that with the DataGrid control itself? Or in CodeBehind should one...
16
by: William Buchanan | last post by:
Hi folks I want to show 2 records on a page side by side. Each record has an image which will be displayed and a bit of text. How can I do this? Thanks Will
0
by: mingr9 | last post by:
hi, my first post here... i am doing a database system that need VB6 to access the Database. The database is make in MS Access 2003. There is Hyperlink column in one of the table.... i able...
1
by: simonyong | last post by:
hello, everyone Sorry for disturb.. im newbie to asp.net im trying to do a task that as below: In a SAME datagrid, it ll show all data when user key in key word in textbox... datagrid will...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.