Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
In my project i've 4 labels and a button, i want to display the first four items from the row to display it on the label, when i'm pressing the button next four items from the database should be displayed in the label.
Posted
Comments
lukeer 18-Jun-13 6:10am    
Ok. Where's the problem?

Nice read:How to get an answer to your question.[^]
Shahin Khorshidnia 18-Jun-13 7:18am    
So? Do you want us to code for you?
Tricube 19-Jun-13 2:41am    
ya

1 solution

Please try the following

DataTable dtTest = new DataTable("Test");

dtTest=GetData();

int iCount = 4;

for (int i = 0; i <=iCount; i++)
{
DataRow drTest = dtTest.Rows[i];
string lbl = drTest["Col1"].ToString();
}
 
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