image14image22 Hi,

I am extracting datas from the csv file to display in datagridview1 as shown in image1.

Now I want to search the datagridview1 and display the result in datagridview2 as shown in image2.

Please do refer the attached images.
I am using Visual basic 2010 for this.

Can anybody Plz help me out in solving this?

Hi,

The second form will be consisting of one datagridview and one button. when the user clicks the button,the first datagridview1 from the form1 is to be searched. It should first search for the identical names. e.g. if 'aleksander' name is 2 times in the names column and if the sports he is interested are football and car racing then aleksander must be displayed once and the sports he is interested must be displayed - i.e. football in next to the names column and car racing to the next column. This must work for all the details which are extracted from the csv file. Sorry I am just a beginner and i have written my code only to extract from the csv file to datagridview1 in form1. I am struggling to get the desired output as below. So please help me on this isssue.
It seems very interesting.

I have attached the csv file.

Name Sports

aleksy rugby
alesander football
aleksy hurdles
aleksander car racing
bazyli cricket
grzegorz boxing
Bazyli water polo
aleksy Baseball

to

Name Sports0 Sports1 Sports2

aleksy rugby hurdles Baseball
alesander football car racing -
Bazyli cricket water polo -
grzegorz boxing - -

the columns must keep on increasing depending on the number of sports. e.g
if aleksy interested in onemore sport then an another column must be added.

Your reply would be much precious...............

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.