﻿<?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 - CustomRequest on RowSelect for Self Reference grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/CustomRequest-on-RowSelect-for-Self-Reference-grid/</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>CustomRequest on RowSelect for Self Reference grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/CustomRequest-on-RowSelect-for-Self-Reference-grid/</link><pubDate>Thu, 19 Nov 2009 02:06:52 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;Glad to hear the good news.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', 'sans-serif'; color: #1f497d; font-size: 9pt"&gt;Should you need further assistance or run into any problems regarding our controls, feel free to post it into our forum. We would be happy to assist you again.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>CustomRequest on RowSelect for Self Reference grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/CustomRequest-on-RowSelect-for-Self-Reference-grid/</link><pubDate>Thu, 12 Nov 2009 11:17:41 GMT</pubDate><dc:creator>aiyer</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;That worked .&lt;/p&gt;
&lt;p&gt;Thanks &lt;/p&gt;
&lt;p&gt;Arun&lt;/p&gt;</description></item><item><title>CustomRequest on RowSelect for Self Reference grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/CustomRequest-on-RowSelect-for-Self-Reference-grid/</link><pubDate>Wed, 11 Nov 2009 20:41:06 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;I’m sorry for the late respond.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Please try to change the “if” conditional statement into following.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;function wgMessages_OnRowSelect(controlId, tblName, rowIndex, rowEl)
{
    // retrieves WebGrid's object
    var wgMessages = ISGetObject(controlId);
    var selectedObject = wgMessages.GetSelectedObject(); // return object of type SelectedObject
    // get root row element ( needed for ColumnSet scenario )
    var selectedRowElement = wgGetRootRow(rowEl);
    &lt;span style="color: #7030a0"&gt;var e = window.event;&lt;/span&gt;
    &lt;span style="color: #7030a0"&gt;var clickedObject = e.srcElement.tagName;&lt;/span&gt;
    
    &lt;span style="color: #7030a0"&gt;if (selectedRowElement.type == "Record" &amp;&amp; clickedObject != "IMG")&lt;/span&gt;
        wgMessages.SendCustomRequest(); // perform send custom request
    else
        hideContent();
                
    return true;
}&lt;/pre&gt;

&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;The plus sign (“&amp;#43;” as the expanded button of self reference parent row) is an image. I modify the conditional “if” statement so that &lt;strong&gt;it will returns true only if the selected row is “record” and the clicked object is not “IMG” image tag&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;The srcElement returns the element that fired the event. This is an object, and has the same properties as the element. So, if we click on an image, event.srcElement.tagName will return ‘IMG’.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Hope this help.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>CustomRequest on RowSelect for Self Reference grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/CustomRequest-on-RowSelect-for-Self-Reference-grid/</link><pubDate>Wed, 11 Nov 2009 13:04:10 GMT</pubDate><dc:creator>aiyer</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Any one can help me in this?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Arun&lt;/p&gt;</description></item><item><title>CustomRequest on RowSelect for Self Reference grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/CustomRequest-on-RowSelect-for-Self-Reference-grid/</link><pubDate>Fri, 06 Nov 2009 05:21:05 GMT</pubDate><dc:creator>aiyer</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks for the update.On which event I can put my &lt;span style="color: #1f497d; font-family: segoe ui"&gt;SendCustomRequest()” .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d; font-family: segoe ui"&gt;My&amp;nbsp;requirement is to show the details of the Row selected on the Right side of the page .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d; font-family: segoe ui"&gt;&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d; font-family: segoe ui"&gt;Also what condition I can check If my SendCustomRequest() is on &lt;span style="color: #000000"&gt;OnRowSelect() event to avoid the trigger on expand of parent?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: segoe ui"&gt;Arun&lt;/span&gt;&lt;/p&gt;</description></item><item><title>CustomRequest on RowSelect for Self Reference grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/CustomRequest-on-RowSelect-for-Self-Reference-grid/</link><pubDate>Thu, 05 Nov 2009 23:32:02 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;After check your code, it is unavoidable to expand the parent row without invoking SendCustomRequest();. Clicking the plus icon of the parent row, will invoke OnRowSelect client side event of WebGrid; and the “if” statement will return true since the type of the selected row is record.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Please try to put the “SendCustomRequest()” method in another proper client side event (depends on your scenario) or try to modify the “if” statement so that the conditional statement will have different return value.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>CustomRequest on RowSelect for Self Reference grid</title><link>http://www.intersoftsolutions.com/Community/WebGrid/CustomRequest-on-RowSelect-for-Self-Reference-grid/</link><pubDate>Thu, 05 Nov 2009 10:10:09 GMT</pubDate><dc:creator>aiyer</dc:creator><description>&lt;p&gt;HI,&lt;/p&gt;
&lt;p&gt;I have a self referencing grid with 'Load on demand' for loading the child records.&lt;/p&gt;
&lt;p&gt;I have a javascript function for OnRowSelect client side event.I am having a SendCustomRequest Call in this function which does a fly postback.The issue is when I click the plus icon of the parent row to get the child this custom request is getting triggered and the childs are not loading ,&lt;/p&gt;
&lt;p&gt;Any solution for this to avoid calling 'SendCustomRequest' when I try to expand the parent&lt;/p&gt;
&lt;p&gt;?here is my code.&lt;/p&gt;&lt;pre&gt; function wgMessages_OnRowSelect(controlId, tblName, rowIndex, rowEl)
{
 var wgMessages = ISGetObject(controlId);
var selectedObject = wgMessages.GetSelectedObject(); // return object of type SelectedObject	
var selectedRowElement = wgGetRootRow(selectedObject.GetRowElement()); 
 if ((selectedRowElement.type == "Record")                                                                                                                    
{
	wgMessages.SendCustomRequest();
}

}                                                                                                                                                                  &lt;/pre&gt;
</description></item></channel></rss>