Add a Link in Cell Template

3 posts, 0 answers
  1. Pierre
    Pierre avatar
    56 posts
    Member since:
    Jun 2016

    Posted 18 Oct Link to this post

    Hi,

    I have search everywhere.

    Documentation( Really poor documentation on  Pivot ) , Knowledge Base ( Last post 2015, the second last 2012 ) , Forum well ..

    Is it possible to add a "Real link" in the cell of a PivotGrid.
    By real , I mean base on data that are in the result set but are not diplayed. Things like id, number that are never displayed to Customer.

    I would like to show some more information based on fields that are in the result set but are not diplayed.
    Its to mutch information for a little tooltips.

    I need to create a link with "~/Somewhere/MyDetailPage.aspx?P=HiddenRowField&Filter=ColumnField"


    As its seems to be impossible to get multiple field value into a cell template.
    If I add a button in the cell template. Will I be able to retrieve Row/Column Field Value Of the clicked Button ?

     

  2. Pierre
    Pierre avatar
    56 posts
    Member since:
    Jun 2016

    Posted 19 Oct in reply to Pierre Link to this post

    Rad PivotGrid Can't be a dead end, Customer don't want some information displayed in Pivot Grid for the beauty of it.
    I am not sure why we can't access multiple field value that are in the datasource.
    Do we really need to check all cell on bound to add a simple link. Connecting to DataBase for every cell trying to get the Id we are looking base on the only data stored in the 'Compressed datasource' aka the result of the aggregation function.
     
    So Container.DataItem  Give me 2 .. So what is the seller the product and the shop the date anything ?
    Any usefull information that is not here only for display.
    Do not get me wrong - I 'm not complaning i am looking for a solution.
    this could have been a feature request but i have no time to desgn this for you.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1794 posts

    Posted 21 Oct Link to this post

    Hi Pierre,

    The RadPivotGrid main idea is to summarize reports and display information to the end user and customization beyond that purpose are hard to achieve with that control, due to its complexity. Nevertheless, for this particular requirement you can handle the OnCellDataBound event and use the following code for retrieving the parent columns and rows of the data cells:
    PivotGridDataCell dataCell = e.Cell as PivotGridDataCell;
     
    if (dataCell != null && dataCell.CellType == PivotGridDataCellType.DataCell)
    {
        string rowName = GetName(dataCell.ParentRowIndexes);
        string columnName = GetName(dataCell.ParentColumnIndexes);
        var value = dataCell.DataItem;
        // your custom logic
    }

    Hope this helps.
     

    Regards,
    Konstantin Dikov
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
Back to Top