Author Topic: creating <a href= link in a cell  (Read 5690 times)

larksys

  • Newbie
  • *
  • Posts: 23
    • View Profile
creating <a href= link in a cell
« on: December 19, 2014, 09:22:58 am »
I can't find much info on the subject.  Can you point me to an example or tutorial?

<script type="text/javascript">
   $(document).ready(function() {
    ListUsers=function(em) {
        var emid = em.title;
        //$('#userslistdiv').html('id-' + emid);
        $('#userslistdiv').show();

        //var obj = { width:700, height:400, title:"List of Emailer Individuals" };
        var colM = [
            { title: "IndivID", width: 100, dataType: "integer", editable: false },
            { title: "Lastname", width: 150, dataType: "string", editable: false },
            { title: "Firstname", width: 150, dataType: "string", editable: false }
        ];
        var dataModel = {
            location: "remote",
            dataType: "JSON",
            method: "GET",
            paging: 'local',
            rPP:10,
            getUrl : function () {
                return { url: 'cfc/basic.cfc?method=getIndivs&EmID=' + emid};
            },
            getData: function ( response ) {
                return { data: response.DATA };
            }
           }
        $("#userslistdiv").pqGrid({ width:458, height:470, title:"List of Emailer Individuals", dataModel: dataModel, colModel: colM, scrollModel:{horizontal: false} });
            //alert("it worked-" + emid);
    };

    $( "#IndivID" ).on( "pqgridcellclick", function( event, ui ) {
       alert('cell clicked');
    } );

});

</script>

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: creating <a href= link in a cell
« Reply #1 on: December 19, 2014, 04:12:40 pm »
Take note of the column.render callback to return any HTML to be displayed in the Price column of this demo

http://paramquery.com/demos/render_cells

larksys

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: creating <a href= link in a cell
« Reply #2 on: December 20, 2014, 06:26:36 am »
Thank you.  Got it to work.