views:

45

answers:

1

Can following thing be done?

alt text

The red rectangled datatable should be modified as the other row.

I am using c#, DataTable with MS-SQL. I want to give shown type of view of second row to the user in a windows.

I'll be having at least 500-600 rows like this out of 1000 rows. Which can be shorten down to 1000-600/3 = 800. (Perhabs, I can take this chance because the operation will not be time consuming.) The user will be having ease in putting data only once in place of puttinig it thrice .. will save time for them and over all performance.

Please ask question for help me solve this problem.

Thanks in advance.

A: 

There is an article about this here: http://www.projectdmx.com/tsql/rowconcatenate.aspx, "Concatenating row values in Transact-SQL".

The conclusion is that this is not a trivial task and can be achieved using SQL or in code.

I would probably perform the database querying in code and then modify the DataTable and databind the grid with the modified DataTable. If the grid allows editing, then you have to perform the reverse transform before saving it to the database.

Andreas Paulsson
Hey, I've been bg with other works alike .. thanks I'll try it from 15'Oct. I see this is relevant one.
Rahul2047