Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3338
How can I get the contents of a row cell for the client?
posted

I am using a template column that has an image control in it.

Part of what I am trying to do is get the imageurl = getimage.aspx?id=    and then the id field from another cell on this row

if the keyfield of the row is called imageid

what is the syntax to put in the imageurl custom binding code expression that will provide the contents of the imageid cell?

 

 

  • 7694
    posted

     Hello,

    Please try to use JavaScript code below.

    ... 

    <ClientSideEvents CellClickHandler="GetCellValue" />

    .... 

    <script type="text/javascript">

       

        function GetCellValue(gridId, cellId){

            if(igtbl_getCellById(cellId).Element.childNodes.length>1){

                igtbl_getCellById(cellId).Element.childNodes[1].src="http://forums.infragistics.com/Themes/leanandgreen/images/rankicons/rankTop150.gif";

            }

        }

       

        </script>

    I hope this sample helps.