This is a migrated thread and some comments may be shown as answers.

Show Multiple rows in a cell

1 Answer 234 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Avinash
Top achievements
Rank 1
Avinash asked on 22 Mar 2011, 08:28 PM
Hi,

For my reporting purpose I am using telerik grid, however, I am blocked in one area.

My requirement is:

Suppose I have grid for Employee list with individual details like, Name, designation, joining date which contains single value. Now I have some columns which contains more than 1 value. I have created relational table to  store those values against employeeID.
For this we'll take an example of Languages:
For employee I have added 3 languages with each proficiency level
Language Proficiency Level
------------   ---------------------
English  Fluent
Portugal  Conversational
Hindi   Native 

so in employee table there is one record and in relational table record as like above
Now when I will show record into grid, client is expecting like this
Employee Name  Designation                    Languages
ABC                        Software Engineer           English-Fluent; Portugal-Conversational; Hindi-Native

Is it possible to do this. There are other work around for this like cursor, temp table or in C# code. But I want to do this single query if possible.

Please help me out.

Regards,
Avinash
                                               


1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 24 Mar 2011, 10:50 AM
Hi Avinash,

I believe that the following online resources will help you configure multi-column data through template columns/cell span:
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/columntypes/defaultcs.aspx

http://www.telerik.com/community/code-library/aspnet-ajax/grid/span-cells-in-grid-over-multiple-positions.aspx

You can concatenate the two tables either dynamically from the code behind, into one table, or via the select statement of the datasource control, by joining them.
I hope this information gets you started properly.

Greetings,
Pavlina
the Telerik team
Tags
Grid
Asked by
Avinash
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or