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

How can we Group cell in the GridView based on some Condition

1 Answer 130 Views
GridView
This is a migrated thread and some comments may be shown as answers.
kotu k
Top achievements
Rank 1
kotu k asked on 28 Jul 2010, 06:50 AM
Hi,
    I am using Rad controls for Winforms Q1 2010 SP1 in my Client machine. Actually m facing problem with how Can we merge cells in the Gridview based on the Cell value is null.
Please help me, How to reslove this issue in my Project. Ans also m sending sample snap shoot how data should present in the Gridview. If, Mergging cell is not posiable in GridView, please suggest me is there any alternate flow to achive this functionality.

Awaiting for your response.

Thanks,
KKC

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 02 Aug 2010, 04:42 PM
Hi kotu k,

Thank you for writing.

Unfortunately we do not support merging cells at present. What I can offer you as alternative is to remove the borders for specific cells in order to make their visual appearance similar to a merged cells.This can be achieved by subscribing for the ViewCellFormatting event and getting the cell you want to change the borders of, set its BoxBorderStyle to FourBorders and set the Width of the border you want to 0. Please have in mind that if these cells are selected, you will still be able to see their shape.

Another option is to create a template by using GridColumnGrouping. You can see an example of this in our Demo application, which comes with our controls, located in Start Menu >> Programs >> Telerik >> RadControls for WinForms [version] >> VS200[x] >> C# or VB Examples. Lunch the application and navigate to GridView >> Columns >> GridViews, and check the Column Groups View checkBox. This is how a template looks.

Please note that a template will format the whole grid identically to its column grouping. In case you find this option convenient, you can locate its code under GridView >> MultipleViews.

I hope you find this information helpful. Should you need any other assistance, do not hesitate to contact us.
 
Greetings,
Stefan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
kotu k
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or