﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - How do i get the keyvalue when i call OnRowContextMenu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-i-get-the-keyvalue-when-i-call-OnRowContextMenu/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>How do i get the keyvalue when i call OnRowContextMenu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-i-get-the-keyvalue-when-i-call-OnRowContextMenu/</link><pubDate>Thu, 16 May 2013 05:16:33 GMT</pubDate><dc:creator>Hans</dc:creator><description>Hello,&lt;br /&gt;&lt;br /&gt;I am truly sorry for the late response. Currently we had some problems in our server.&lt;br /&gt;&lt;br /&gt;Thank you for your question.&lt;br /&gt;&lt;br /&gt;You could use this line of code to get the KeyValue each row: rowElement.keyValue&lt;br /&gt;&lt;br /&gt;Here’s the example snippet code how to implement the code:&lt;pre&gt;&amp;lt;script type="text/javascript" language="javascript"&amp;gt;    function WebGrid1_OnRowContextMenu(controlId, rowType, rowElement, menuObject)
    {
        var WebGrid1 = ISGetObject(controlId); 
        alert(rowElement.keyValue);
        return true;
    }
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;p&gt;Hope this helps.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Hans.&lt;br /&gt;&lt;/p&gt;
</description></item><item><title>How do i get the keyvalue when i call OnRowContextMenu</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-i-get-the-keyvalue-when-i-call-OnRowContextMenu/</link><pubDate>Mon, 13 May 2013 11:48:49 GMT</pubDate><dc:creator>thiscouldbebetter</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This is a very simple question, but as usual the webgrid control does not make it easy to fathom out.&lt;/p&gt;
&lt;p&gt;When i call the the method OnRowContextMenu, eg:&lt;/p&gt;
&lt;p /&gt;
&lt;p&gt;        function OnRowContextMenu(controlId, rowType, rowElement, menuObject) {&lt;/p&gt;
&lt;p&gt;            // How do i get the rows keyvalue ID ??&lt;/p&gt;
&lt;p&gt;            window.alert(key);&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;        }&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;How do i get the  keyvalue of the row so i can customise the context menut to suit the data ?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p /&gt;</description></item></channel></rss>