Hi,
I am liking this new control, but I have one challenge.
My data has a variable number of columns returned.
I would like to set the column widths (beyond the 1st one) to a fixed size.
However, the column widths appear to be adjusted to fill up the available space.
Any thoughts?
Jim
I am liking this new control, but I have one challenge.
My data has a variable number of columns returned.
I would like to set the column widths (beyond the 1st one) to a fixed size.
However, the column widths appear to be adjusted to fill up the available space.
Any thoughts?
Jim
<telerik:RadPivotGrid ID="grdRACI" runat="server" AllowFiltering="False" DataSourceID="sqlRACI" ClientSettings-Scrolling-AllowVerticalScroll="false" TotalsSettings-GrandTotalsVisibility="None" Skin="Vista" AggregatesLevel="-1" ColumnHeaderCellStyle-Width="100px" RowHeaderCellStyle-Width="400px" AggregatesPosition="Columns" OnCellDataBound="grdRACI_CellDataBound" IsFilterCommandInProgress="False" DataCellStyle-Width="100px" RowHeaderTableLayout="Fixed" ColumnHeaderTableLayout="Fixed" ShowColumnHeaderZone="False" ShowDataHeaderZone="False" ShowFilterHeaderZone="False"> <Fields> <telerik:PivotGridRowField DataField="Task" UniqueName="column"> </telerik:PivotGridRowField> <telerik:PivotGridColumnField DataField="RoleName" UniqueName="column1"> </telerik:PivotGridColumnField> <telerik:PivotGridAggregateField DataField="RACI" Aggregate="Max" GrandTotalAggregateFormatString="" UniqueName="column2"> </telerik:PivotGridAggregateField> </Fields> <TotalsSettings GrandTotalsVisibility="None" /> <ConfigurationPanelSettings Position="FieldsWindow" /> </telerik:RadPivotGrid> protected void grdRACI_CellDataBound(object sender, PivotGridCellDataBoundEventArgs e) { if (e.Cell is PivotGridColumnHeaderCell) { PivotGridColumnHeaderCell cell = e.Cell as PivotGridColumnHeaderCell; cell.HorizontalAlign = HorizontalAlign.Center; cell.Wrap = true; } if (e.Cell is PivotGridDataCell) { Color CFFD_Highlight = Color.Beige; PivotGridDataCell dataCell = e.Cell as PivotGridDataCell; if (dataCell != null) { switch (dataCell.Text) { case ("1"): dataCell.Text = "R"; break; case ("2"): dataCell.Text = "A"; break; case ("3"): dataCell.Text = "C"; break; case ("4"): dataCell.Text = "I"; break; case ("5"): dataCell.Text = "R/A"; break; case ("10"): dataCell.Text = "R"; dataCell.BackColor = CFFD_Highlight; break; case ("20"): dataCell.Text = "A"; dataCell.BackColor = CFFD_Highlight; break; case ("30"): dataCell.Text = "C"; dataCell.BackColor = CFFD_Highlight; break; case ("40"): dataCell.Text = "I"; dataCell.BackColor = CFFD_Highlight; break; case ("50"): dataCell.Text = "R/A"; dataCell.BackColor = CFFD_Highlight; break; } dataCell.HorizontalAlign = HorizontalAlign.Center; } } }