Click here to Skip to main content
15,920,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am encountering a problem . I have to create paging in datgrid in c#desktop application but I am not getting the PAGING OR ALLOWPAGING PROPERTY in c# desktop application


Actually i am scraping a website(name address) and saving it in .csv file but now i have to show this data in grid view with paging. I have written code that writes data in data grid but doesnot have paging facility. thats what i want to achieve.

How to achieve this
Thanks in Advance.
Posted
Updated 6-Jun-11 18:52pm
v4
Comments
[no name] 7-Jun-11 0:52am    
Please show your code which you have tried for this based on this we will guide you where you went wrong.
[no name] 7-Jun-11 0:57am    
iam not going wrong any where i have got all dat in grid view just want navigatiion to next and previous page . iam encllosing the code ion a while
[no name] 7-Jun-11 0:57am    
------------yellow pages----------


public delegate void AddRowToGridViewDelegateyellow(string r1, string r2, string r3, string r4, string r5, string r6,string r7,string r8,string r9,string r10);


AddRowToGridViewDelegateyellow addRowToGridViewDelegateobjectyellow;

public Form1()
{
addRowToGridViewDelegateobjectyellow = new AddRowToGridViewDelegateyellow(AddRowToGridViewfunctionyellow);
}

void AddRowToGridViewfunctionyellow(string r1, string r2, string r3, string r4, string r5, string r6,string r7,string r8,string r9, ,string r10)
{
string[] data = { r1, r2, r3, r4, r5, r6,r7,r8,r9,r10 };
dataGridView1.Rows.Add(data);
}


string data = companyname + "," + address + "," + city + "," + state + "," + zipcode + "," + phoneno + "," + website + "," + email + "," + category + "," + review;


this.Invoke(addRowToGridViewDelegateobjectyellow, companyname,address,city,state,zipcode,phoneno,website,email,category,review);
[no name] 7-Jun-11 0:59am    
instead of
this.Invoke(addRowToGridViewDelegateobjectyellow, companyname,address,city,state,zipcode,phoneno,website,email,category,review);

i previously wrote code that saves data in .csv file

thx 4 help

You have not provided, so it is hard to help you.
However, maybe looking at some other implementations (like DataGrid Paging - C# Windows Forms[^]) can help you.
 
Share this answer
 
People at code project have written articles on same issue. Have a look at:

DataGrid Paging - C# Windows Forms[^]

Paging in a DatagridView[^]

http://support.microsoft.com/kb/307710[^]
 
Share this answer
 
Hope DataGrid Paging - C# Windows Forms[^] article from CP might help you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900