Approved
Last Updated: 17 May 2019 06:57 by ADMIN
Kasim
Created on: 01 May 2019 08:00
Category: PivotGrid
Type: Bug Report
1
RadPivotGrid DataCellStyle CssClass not getting applied

The code in the ASPx file is 

 <DataCellStyle CssClass="cfDataCell" Width="9%"/>


The expected output in the client browser is


 <tr style="height: 35px;">
        <td class="rpgDataCell cfDataCell" style="width:9%;">823</td>
        <td class="rpgDataCell cfDataCell" style="width:9%;">2,488</td>
        <td class="rpgDataCell cfDataCell" style="width:9%;">7,518</td>
        <td class="rpgDataCell cfDataCell" style="width:9%;">10,851</td>
        <td class="rpgDataCell cfDataCell" style="width:9%;">13,017</td>
        <td class="rpgDataCell cfDataCell" style="width:9%;">13,069</td>
        <td class="rpgDataCell cfDataCell" style="width:9%;">13,253</td>
        <td class="rpgDataCell cfDataCell" style="width:9%;">12,799</td>
        <td class="rpgDataCell cfDataCell" style="width:9%;">9,861</td>
        <td class="rpgDataCell cfDataCell" style="width:9%;">4,543</td>
        <td class="rpgDataCell cfDataCell" style="width:9%;">2,038</td>
        <td class="rpgDataCell cfDataCell" style="width:9%;">592</td>
      </tr>

However the generated Html is as below:


 <tr style="height: 35px;">
        <td class="rpgDataCell" style="width:9%;">823</td>
        <td class="rpgDataCell" style="width:9%;">2,488</td>
        <td class="rpgDataCell" style="width:9%;">7,518</td>
        <td class="rpgDataCell" style="width:9%;">10,851</td>
        <td class="rpgDataCell" style="width:9%;">13,017</td>
        <td class="rpgDataCell" style="width:9%;">13,069</td>
        <td class="rpgDataCell" style="width:9%;">13,253</td>
        <td class="rpgDataCell" style="width:9%;">12,799</td>
        <td class="rpgDataCell" style="width:9%;">9,861</td>
        <td class="rpgDataCell" style="width:9%;">4,543</td>
        <td class="rpgDataCell" style="width:9%;">2,038</td>
        <td class="rpgDataCell" style="width:9%;">592</td>
      </tr>

3 comments
ADMIN
Eyup
Posted on: 17 May 2019 06:57
Hi Kasim,

Yes, this can be considered as a bug. I've updated the status of the feedback item and awarded you Telerik points for the inconvenience.

We are striving to provide better and better products and service to our customers. We are focusing our power to both anticipated new features and functionality/appearance bugs which may slow down the development of our customers. That's why we are arranging our priorities with caution and beneficial reason. 

This specific problem can be easily resolved by using appropriate CSS rules or the workaround in the code-behind which was provided. I'm afraid I cannot provide any firm timeframe when or whether it will be fixed in the source code.

Regards,
Eyup
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Kasim
Posted on: 12 May 2019 03:40

Hi Eyup,

When there is a setting option available for CssClass of data cell, it is expected to be applied as it is on other control. Duplication of work in the CellDataBound event should not be required. 

In the same control the ColumnHeaderCellStyle & RowHeaderCellStyle are getting applied as usual.

For now, I can use the workaround suggested by you to get away with the current issue in hand.

When can we expect a final fix to the bug?

ADMIN
Eyup
Posted on: 08 May 2019 07:55
Hi Kasim,

Yes, you are right. Generally, these kind of styling properties like font, width, alignment, etc. are not specifically Telerik properties, but they are rather inherited. They are also present in regular asp: controls for example. Therefore, they can be overriden by Telerik's built-in settings.

In this case you can directly use the default built-in rpgDataCell class of the pivot grid.

Alternatively, you can use the following approach which will allow you to achieve the original requirement:
protected void RadPivotGrid1_CellDataBound(object sender, PivotGridCellDataBoundEventArgs e)
{
    if (e.Cell is PivotGridDataCell)
    {
        PivotGridDataCell cell = (PivotGridDataCell)e.Cell;
        cell.CssClass = "cfDataCell";
    }
}

I hope this will prove helpful.

Regards,
Eyup
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.