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

Unbound PivotGrid

3 Answers 93 Views
PivotGrid and PivotFieldList
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 05 Feb 2013, 04:40 PM
Hi,

Are there any examples of a Unbound PivotGrid? I would like to have PivotGrid that looks like a Property Grid.
I need to use PivotGrid because I need multiple rows.  I need to add my own rows.
I would like to have a PivotGrid that has categories (groups) and images in the individual rows.

I have not found any examples for adding rows manually.

Below is an example of what I want the grid to look like.

Thanks
Steve Morrow

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 08 Feb 2013, 10:16 AM
Hi Steve,

By design RadPivotGrid is implemented for business intelligence purposes and it is a data summarization tool. It aggregates the data coming from a data table or a data cube (OLAP), and then this data is displayed to the end-user. Its UI can't be used outside the context of this scenario, hence it can't be used in unbound mode.

You can either use our RadGridView applying a GroupDescriptor for the groups handling CellFormatting for the images, or RadPropertyGrid handling the ItemFormatting for the images.

All the best,
Peter
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
Steve
Top achievements
Rank 1
answered on 08 Feb 2013, 02:05 PM
Can you please point to examples of using the RadGridView in this manner?
0
Peter
Telerik team
answered on 13 Feb 2013, 08:42 AM
Hello Steve,

Thank you for writing back.

You can refer to this Knowledge Base article: 
Change row and cell visual appearance using code. 
Please, refer to the sample code below:  
void gridView_CellFormatting(object sender, CellFormattingEventArgs e)
{
    GridDataCellElement cell = e.CellElement as GridDataCellElement;
    if (cell != null)
    {
        if (cell.Value = ....)
        {
            cell.Image = myImage;
            cell.TextImageRelation = TextImageRelation.TextBeforeImage;
            cell.ImageAlignment = ContentAlignment.MiddleRight;
            cell.ImageLayout = ImageLayout.None;
        }  
        else
        {
            cell.ResetValue(LightVisualElement.ImageProperty, ValueResetFlags.Local);
            cell.ResetValue(LightVisualElement.ImageAlignmentProperty, ValueResetFlags.Local);
            cell.ResetValue(LightVisualElement.TextImageRelationProperty, ValueResetFlags.Local);
        }
    }
}

I hope you find my answer useful. 

Regards,
Peter
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Tags
PivotGrid and PivotFieldList
Asked by
Steve
Top achievements
Rank 1
Answers by
Peter
Telerik team
Steve
Top achievements
Rank 1
Share this question
or