Feature request - SortExpression

3 posts, 0 answers
  1. Barbaros Saglamtimur
    Barbaros Saglamtimur avatar
    110 posts
    Member since:
    Jul 2012

    Posted 25 Apr 2013 Link to this post

    Is it possible to add SortExpression property? Like;
    <telerik:PivotGridRowField DataField="ITEMNAME" Caption="Ürün Adı" UniqueName="ITEMNAME" ZoneIndex="4" SortExpression="ItemId">

    and default sort for the PivotGrid does not function if it does not binded to a DataField property.
    For example; I did not bind ItemId to a RowField but would like to have default sort on that field. I think we need something like AdditionalDataFieldNames property.

        <telerik:PivotGridSortExpression FieldName="ItemId" SortOrder="Ascending" />

    You know, RadGrid has this functionality.

    PS:Attached screen shot shows my problem.

  2. Antonio Stoilkov
    Antonio Stoilkov avatar
    530 posts

    Posted 30 Apr 2013 Link to this post


    The desired functionality could not be achieved because in order to sort a particular field it should be included in the data. The reason behind this is because the RadPivotGrid engine calculates based on the supplied data.

    All the best,
    Antonio Stoilkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. DevCraft R3 2016 release webinar banner
  4. Dave C
    Dave C avatar
    2 posts
    Member since:
    Feb 2011

    Posted 18 Jul 2013 Link to this post

    I also needed to customize the sort of the Row Header.  Since I could not connect a field that contained the right sort sequence to the Row Header DataField, I included the sort sequence as the beginning character in the Row Header Value, then removed the sort sequence during PivotGrid_CellDataBound.
            protected void MyPivotGrid_CellDataBound(object sender, Telerik.Web.UI.PivotGridCellDataBoundEventArgs e)
                // Format RowHeader Cell (custom sort cheat by including sort number in Measure field)
                if (e.Cell is PivotGridRowHeaderCell)
                    PivotGridRowHeaderCell cell = e.Cell as PivotGridRowHeaderCell;
                    cell.Text = cell.Text.Remove(0, 2);
Back to Top