Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Add border to a group or subgroup

Answered
Rodrigo asked on May 25, 2020

Hi Team,

I was having a look on the grid customization docs, but I did not succeeded. Is there a way to add border to groups or subgroups. I am attaching an image as an example, is the requirement I have here.
 
Thank you,
Rodrigo 

Attachments:
Requirement Report.jpg

3 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster May 25, 2020

Hello, Rodrigo,
 
Thank you for your question.
 
Our team would like to kindly explain that such a feature can not be achieved using default options provided by Flexmonster.
 
Even so, you are welcome to try implementing the feature using the customizeCell API call.
Please check an example we have prepared for you. The sample demonstrates how to apply the following CSS class to the appropriate cells using customizeCell method:

.underlined {
border-bottom: 1px solid black !important;
}

 
The appropriate cells are chosen based on their isClassicTotalRow property. Such property is set to true in case the cell belongs to the subtotal row:

if(data.isClassicTotalRow) cell.addClass("underlined");

 
Please note that subtotals must be enabled in order to use the described approach.
 
Detailed information about the customizeCell function can be found in our documentation.
 
Please contact us in case additional questions appear.
 
Kind regards,
Illia

Public
Rodrigo May 26, 2020

Hi Illia,
Thank you very much for the response. The problem is in my scenario I cannot use the total. I found a way to track my data the row index and match with the row index on table using your approach.

But now I am facing a second issue, is not exporting to Excel with the border. Is this the behaviour?
Thank you,
Rodrigo

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster May 26, 2020

Hello, Rodrigo,
 
Thank you for your feedback.
 
We are happy to hear you did manage to find a workaround allowing tracking appropriate rows using indexes.
 
Concerning exporting to Excel: our team wants to explain that such customization can not be applied to the exported Excel file. It is due to the fact that customization affects only HTML elements representing cells.
 
We hope such a limitation is not critical for your use case.
Please contact us in case other questions arise.
 
Kind regards,
Illia

Please login or Register to Submit Answer