Forums

Forums / Developing Portals / Pass record GUID from Sub-Grid

Pass record GUID from Sub-Grid

Thread is closed for posting
2 posts, 1 answered
  1. c.arsenault
    c.arsenault avatar
    2 posts
    Registered:
    20 Aug 2015
    30 Dec 2015
    Link to this post
    What I am trying to do is I have a CRM Sub-grid displaying a list of Events. I have a literal column that is formatted using HTML to display two links - View & Register. I want the View link to go to a certain page, but bring along the GUID of the sub-grid row record so on the redirect page it will display CRM data. This is accomplished OOB by using the Edit function of the sub-grid, and linking to the page, however, I want to create my own custom links rather than an edit icon.

    I will have to use this functionality elsewhere in the portal, and so I would like to get this working if possible. I read somewhere that the only option would be to create a new widget that would have this already in it - but really all I need is for the link(s) to call the OnCommand function of the sub-grid.

    Any help would be greatly appreciated.

    Thanks!
  2. Missing user
    Missing user avatar
    Answered
    04 Jan 2016 in reply to c.arsenault
    Link to this post
    Hi Arsenault,

    It's possible for you to change the edit column of the grid to fit your specifications if you would like that.. For instance, you can change the edit icon through the Sub-Grids' template by adding the ImageUrl property​. This is what the edit column should look like in the template:

     <​ UniqueName="btnEdit" ButtonType="ImageButton" CommandName="Edit" ButtonCssClass="editBtn" ImageUrl="~/images/default-source/icons/crystal.png" />

    (Located inside of the <Columns> block)
    The ​example Image URL property here should override the default icon.

    Additionally, you should be able to replace the edit icon with text instead by adding a text property and changing the buttontype of the edit column. You can find more about these properties here: http://www.telerik.com/help/sitefinity/developer-manual/radgrid.net2-telerik.webcontrols.gridbuttoncolumn_members.html

    I would recommend that you create a new template for these changes.

    Secondly, located in the template of the grid is the OnCommand function. This controls what happens when a button on the grid is clicked. You can add new commands here in addition to modifying any already existing ones. Please note that this code will be client-side.

    OnCommand Code Block

    Please let us know if you have any more questions or concerns.

    Kind Regards,

    Chris Rooney.
    Last modified on 04 Jan 2016 17:01 by Missing user
2 posts, 1 answered