How Create Data Table From Top 5 or 6 row in datagridview including column header also .
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
your explanation is too short. Any how, what i understand from this is that either you have a datable and you want to bind its just top 5 to 6 rows to data grid or u want to bring your data grid row to datatable with headers both can done through for each loop..
You can get column names like this from data
OR you can get both rows and column using foreach loop
The same way you can apply with little modifications to get data from datatable