how can I merge columns?

how can I merge columns?
Source Data:
Mode | Type
------------
A1 | AB
A1 | CD
A1 | EF
A2 | AA
A2 | AC

to Merge Columns
Mode | Type
------------
| AB
A1 | CD
| EF
-----------
A2 | AA
| AC
-----------



2 Replies

JC Jacky chen September 4, 2008 07:17 AM UTC

Sorry!Post again!
Source Data:
Mode|Type
=========
_A1_|_AB
_A1_|_CD
_A1_|_EF
_A2_|_AA
_A2_|_AC

to Merge Columns
Mode|Type
=========
____|_AB
_A1_|_CD
____|_EF
_A2_|_AA
____|_AC




RS Rajarajeswari S Syncfusion Team September 8, 2008 06:47 PM UTC

Hi Jacky,

Sorry for the delay in getting back to you.

With Essential GridGroupingControl the merging of rows and columns can be done , by defining the “ColumnSet”. Please refer the below code snippet which illustrates this:


$TableDescriptor AllowEdit="False" AllowNew="False" AllowFilter="False">
$ColumnSets>
$syncfusion:GridColumnSetDescriptor Name="ColumnSetId">
$ColumnSpans>
$syncfusion:GridColumnSpanDescriptor Range="R0C0:R1C0" Name="EmployeeID">$/syncfusion:GridColumnSpanDescriptor>
$/ColumnSpans>
$/syncfusion:GridColumnSetDescriptor>


In the above code a columnset named “ColumnSetId” contains a single fileld “EmployeeID” the range is defined through the range property. Here the range is R0C0:R1C1, so it spans to continuous cells vertically.

Please refer the browser sample from the below link, which illustrates the above technique:


http://www2.syncfusion.com/infrastructure/web/grid.grouping.web/samples/2.0/MergedRows/MultiEmployeeRecords/cs/MultiEmpRecords.aspx


Please have a look at the above and let us know if this helps you out.


Regards,
Raji



Loader.
Up arrow icon