sharp
sharp

Reputation: 1211

Telerik radgridview merge/group

I'm working on an small C# (WPF + SQLite) application where I'm implementing RadGridView from Telerik. I want to merge all columns where is the same ID like in the table. Right now my data looks like this (this is my view).

╔════╤═══════╤══════════╤══════╗
║ id │ ime   │ surname  │ year ║
╠════╪═══════╪══════════╪══════╣
║ 1  │ Name1 │ Surname1 │ 1994 ║
╟────┼───────┼──────────┼──────╢
║ 1  │ Name1 │ Surname1 │ 1995 ║
╟────┼───────┼──────────┼──────╢
║ 2  │ Name2 │ Surname2 │ 1996 ║
╟────┼───────┼──────────┼──────╢
║ 3  │ Name3 │ Surname3 │ 1996 ║
╚════╧═══════╧══════════╧══════╝

And this is what I want to achive in my RadGridView.

╔════╤═══════╤══════════╤═══════╗
║ id │ ime   │ surname  │ year  ║
╠════╪═══════╪══════════╪═══════╣
║ 1  │ Name1 │ Surname1 │ 1994  ║
║    │       │          │ 1995  ║
╟────┼───────┼──────────┼───────╢
║ 2  │ Name2 │ Surname2 │ 1996  ║
╟────┼───────┼──────────┼───────╢
║ 3  │ Name3 │ Surname3 │ 1996  ║
╚════╧═══════╧══════════╧═══════╝

The solution and the problem is merge option who radgridview has. But it mergers all data who are the same value. And it looks okay but the functionality is bad.

It does what I sad but when I try to click the merged cell after double click it does this. (In this example I clicked surname1 cell)

╔════╤═══════╤══════════╤═══════╗
║ id │ ime   │ surname  │ year  ║
╠════╪═══════╪══════════╪═══════╣
║ 1  │ Name1 │ Surname1 │ 1994  ║
╟────────────┼──────────┤ 1995  ║
║            │ Surname1 │       ║
╟────────────┼──────────┼───────╢
║ 2  │ Name2 │ Surname2 │ 1996  ║
╟────┼───────┼──────────┼───────╢
║ 3  │ Name3 │ Surname3 │ 1996  ║
╚════╧═══════╧══════════╧═══════╝

This is my radgridview, the red marked is where i double clicked, and the green cells are one who I want to not to merge + after clicking that row I want it to be selected.

This is my radgridview, the red marked is where i double clicked, and the green cells are one who I want to not to merge + after clicking that row I want it to be selected.

Upvotes: 10

Views: 1468

Answers (1)

Smurfie
Smurfie

Reputation: 124

In their RadGridView documentation, telerik has this to say:

Selection is currently not supported for the merged cells. When selecting a row, all the cells except for the merged one will show as selected.

Upvotes: 4

Related Questions