Access RadPivotGrid Row and Column value for corresponding Data Cell.

2 posts, 0 answers
  1. ts
    ts avatar
    13 posts
    Member since:
    Aug 2014

    Posted 17 Aug 2014 Link to this post

    I am new to .Net programming and trying to impliment RadPivotGrid to develop a report.
    There is no issue with RadPivotGrid implimentation. But, having difficulties in accessing Row and Column Group values.
    As shown in Code behind, I am looking for corresponding sic_2_code and effective_year value for selected data cell.
                    <telerik:PivotGridRowField DataField="sic_2_code" Caption="SIC Group" ZoneIndex="0">
                    <telerik:PivotGridColumnField DataField="effective_year" Caption="Year" ShowGroupsWhenNoData="false">
                    <telerik:PivotGridAggregateField DataField="Proposed Premium" DataFormatString="{0:$#,##0}">
                            <asp:LinkButton ID="LB_ProposedPremium" runat="server" OnClick="LB_ProposedPremium_Click">
                <%# string.Format("{0:$#,##0}", Container.DataItem)%>
    Code Behind

    protected void LB_ProposedPremium_Click(Object sender, EventArgs e)
            string sBusinessSegment = string.Join(",", RCB_BusinessSegment.CheckedItems.Select(x => x.Value).ToArray());
    //I need values of sic_2_code and effective_year to pass to another page
    string sSICCode =??
    string sEffectiveYear =??
            StringBuilder sb = new StringBuilder();
            sb.Append("?SegmentID=" + sBusinessSegment);
    sb.Append("&SICCode=" + sSICCode);
    sb.Append("&EffectiveYear =" + sEffectiveYear);
  2. Radoslav
    Radoslav avatar
    1566 posts

    Posted 18 Aug 2014 Link to this post


    To achieve the desired functionality you can try using the ParentRowIndexes and ParentColumnIndexes which every data cell had. These indexes are array of objects which are the corresponding row and column cell values. More information you can find here:

    I hope this helps.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top