﻿<?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 - Webgrid 8 and cleint event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-8-and-cleint-event/</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>Webgrid 8 and cleint event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-8-and-cleint-event/</link><pubDate>Sun, 23 Sep 2012 11:57:53 GMT</pubDate><dc:creator>bernard</dc:creator><description>&lt;p&gt;Hi John,&lt;/p&gt;&lt;p&gt;OK then. I'm sorry for my lack. The issue that appear in your scenario doesn't appear in my sample. Maybe if you need this scenario, I'll propose this matter as feature request. If you have any further question, please don't hesitate to ask me.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Bernard&lt;/p&gt;</description></item><item><title>Webgrid 8 and cleint event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-8-and-cleint-event/</link><pubDate>Fri, 21 Sep 2012 08:41:27 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;Hi Bernard and thanks for all your help, but it still does not work.  I've decided to drop this and just change CellClickAction to CellSelect making the user click on the arrows to view preview row.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Again Thanks for all your help...&lt;/p&gt;</description></item><item><title>Webgrid 8 and cleint event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-8-and-cleint-event/</link><pubDate>Fri, 21 Sep 2012 00:07:20 GMT</pubDate><dc:creator>bernard</dc:creator><description>&lt;p&gt;Hi John,&lt;/p&gt;&lt;p&gt;I've fix the code and the second problem (firefox problem) doesn't happen in my local end. Here's the code:&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;var buttonClick = false;
function WebGrid1_OnRowSelect(controlId, tblName, rowIndex, rowEl)
{
    var WebGrid1 = ISGetObject(controlId);
    if (buttonClick == false)
    {
        var row = WebGrid1.GetSelectedObject().GetRowObject();
        if (row.Type == 'Record')
        {
            if (row.PreviewRowExpanded)
                row.CollapsePreviewRow();
            else
                row.ExpandPreviewRow();
        }
    }
    buttonClick = false;
    WebGrid1.SetStatus1("", "Ready.", "CommonText/Ready");
    return true;
}
function WebGrid1_OnCellClick(controlId, tblName, rowIndex, cellIndex, cellEl)
{
    var WebGrid1 = ISGetObject(controlId);
    var el = event.srcElement;
    if (el != null)
    {
        if(el.tagName == "IMG")
        {
            if (el.src.indexOf("wg_prexp.gif") != -1 || el.src.indexOf("wg_prcol.gif") != -1)
            {
                buttonClick = true;
            }
        }
    }
    return true;
}&lt;/pre&gt;
&lt;p&gt;For the first issue, I couldn't replicate the issue in our local end. Probably the first problem doesn't happen because there's misconfiguration in my code. Could you give me a simple sample that can reproduce the problem in our local end? To resolve, first problem I need to debug the project here. Sorry for my lack. I will look forward to your feedback so I can assist you further.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Bernard&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>Webgrid 8 and cleint event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-8-and-cleint-event/</link><pubDate>Wed, 19 Sep 2012 07:40:37 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;Hi Bernard,&lt;/p&gt;
&lt;p&gt;Almost there but errors still occur.  Once you expand the preview row, if you click on a column header to sort the table I get an error:&lt;/p&gt;&lt;pre&gt;'null' is null or not an object  807200101, line 7 character 123668. the statement it breaks on is v59a81.loaded=true;&lt;/pre&gt;
&lt;p&gt;Also in Firefox, when you sort a column the 1st row is expanded, clicking on the collapse arrow doesn't collapse the preview row and if you click on the header again, the grid no longer response to anything.  No error is shown.&lt;/p&gt;
&lt;p&gt;I'm using webgrid .101 (2012 R1).&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>Webgrid 8 and cleint event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-8-and-cleint-event/</link><pubDate>Tue, 18 Sep 2012 22:51:26 GMT</pubDate><dc:creator>bernard</dc:creator><description>&lt;p&gt;Hi John,&lt;/p&gt;&lt;p&gt;I've found out your problem. Your WebGrid doesn't have RowHeader and allow grouping feature make row header dynamically. However, I've fixed my code and with this code the problem that you mentioned above doesn't happen. Here's the code:&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;var buttonClick = false;
function WebGrid1_OnRowSelect(controlId, tblName, rowIndex, rowEl)
{
    var WebGrid1 = ISGetObject(controlId);
    if (buttonClick == false)
    {
        var row = WebGrid1.GetSelectedObject().GetRowObject();
        if (row.Type == 'Record')
        {
            if (row.PreviewRowExpanded)
                row.CollapsePreviewRow();
            else
                row.ExpandPreviewRow();
        }
    }
    buttonClick = false;
    WebGrid1.SetStatus1("", "Ready.", "CommonText/Ready");
    return true;
}
function WebGrid1_OnCellClick(controlId, tblName, rowIndex, cellIndex, cellEl)
{
    var WebGrid1 = ISGetObject(controlId);
    var el = event.srcElement;
    if (el != null)
    {
        if(el.tagName == "IMG")
        {
            if (el.nameProp == "wg_prexp.gif" || el.nameProp == "wg_prcol.gif")
                buttonClick = true;
        }
    }
    return true;
}&lt;/pre&gt;
&lt;p /&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Bernard&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>Webgrid 8 and cleint event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-8-and-cleint-event/</link><pubDate>Tue, 18 Sep 2012 07:21:26 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;On my system, the preview icon and the area around the icon is colIndex = 0, the preview row if collapsed is cellIndex=0.  &lt;/p&gt;
&lt;p&gt;If I click to expand the preview row and then click on a header to sort, the header row is now colIndex=1, thus the JS code fails.  Here is my layout settings:&lt;/p&gt;&lt;pre&gt;&amp;lt;LayoutSettings AllowFilter="Yes" AllowGrouping="Yes" AllowSorting="Yes" PagingMode="VirtualLoad" VirtualLoadMode="Custom"
                                GroupByBoxVisible="False" AllowColumnFreezing="No" AllowColumnMove="Yes" AllowExport="No" AlwaysShowHelpButton="false"  
                                AllowSelectColumns="Yes" RowLostFocusAction="NeverUpdate" AutoFilterSuggestion="True" FilterBarVisible="false"  
                                HideColumnsWhenGrouped="No" InProgressUIBehavior="ChangeCursorToHourGlass" PagingSize="50"  
                                ShowFilterStatus="True" RestoreRowSelection="RootTableOnly" VirtualPageSize="50" PagingExportMode="ExportAllData" 
                                AllowMultipleSelection="No" GroupRowInfoFormatDefault="[caption] : [value] ([count])" ColumnFooters="Yes" 
                                HeaderClickAction="SortSingle" ShowColumnAction="true" RowHeaders="No" CellClickAction="RowSelect"&amp;gt;               
                                &amp;lt;FreezePaneSettings ShowInContextMenu="True" MaxFrozenColumns="3" AbsoluteScrolling="True" /&amp;gt;
                                &amp;lt;TextSettings&amp;gt;
                                    &amp;lt;TextItems&amp;gt;
                                        &amp;lt;ISWebGrid:WebGridTextItem TextItem="CommonText/Refresh" TextValue="Refreshing RDRs" /&amp;gt;
                                        &amp;lt;ISWebGrid:WebGridTextItem TextItem="CommonText/NoData" TextValue="There are no RDRs to display, modify the filters above to view RDRs" /&amp;gt;
                                    &amp;lt;/TextItems&amp;gt;
                                &amp;lt;/TextSettings&amp;gt;
                                &amp;lt;AlternatingRowStyle Font-Names="Verdana" BackColor="#ECE9D8" Font-Size="8pt" HorizontalAlign="Center" /&amp;gt;
                                &amp;lt;RowStyle Font-Names="Verdana" Font-Size="8pt" HorizontalAlign="Center" BackColor="#c9c9c9" /&amp;gt;
                                &amp;lt;FooterStyle Font-Names="Verdana" BorderSettings-Left-Color="White" BorderSettings-Top-Color="White" /&amp;gt;
                                &amp;lt;StatusBarStyle BaseStyle="Normal" Font-Bold="True" Font-Size="9pt"&amp;gt;
                                &amp;lt;/StatusBarStyle&amp;gt;
                                &amp;lt;ClientSideEvents OnAfterInitialize="OnAfterInitialize" OnRowSelect="WebGrid1_OnRowSelect" 
                                    OnUnhandledError="WebGrid1_OnUnhandledError" OnResponse="doLoad" OnCellClick="WebGrid1_OnCellClick" /&amp;gt; 
                            &amp;lt;/LayoutSettings&amp;gt;&lt;/pre&gt;</description></item><item><title>Webgrid 8 and cleint event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-8-and-cleint-event/</link><pubDate>Mon, 17 Sep 2012 22:22:29 GMT</pubDate><dc:creator>bernard</dc:creator><description>&lt;p&gt;Hi John,&lt;/p&gt;&lt;p&gt;I couldn't replicate this problem in our local end. In my sample the image that represent PreviewRow button is on index 1 in cellIndex. Also PreviewRow have index 0 in cellIndex. Could you explain me more detail the step to reproduce this issue? Is there any Row Header on your WebGrid?&lt;/p&gt;
&lt;p&gt;Look forward to hear any feedback from you so I can help you further.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Bernard&lt;/p&gt;</description></item><item><title>Webgrid 8 and cleint event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-8-and-cleint-event/</link><pubDate>Mon, 17 Sep 2012 08:08:08 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;Hi Bernard,&lt;/p&gt;
&lt;p&gt;   That helps but still problems exist.  The code works until you click on the header row to sort a column.  Put an alet(cellIndex) in the ObCellClick event, run the page and click on a column to sort by the column, notice that the OncellClick event doesn't run (this is how it should be), now click on any row to view the preview row, then go back and click on a header to sort  and notice that the OnCellClick event runs and the cellIndex = 1, I wouldn't think that this event would fire at this time since you are on a header and not a row.  if you look at the rowIndex, when you click on the header the rowIndex is what ever the value was when you clicked on a record row.&lt;/p&gt;
&lt;p&gt;Also I've notice that the cellIndex of the wg_prexp.gif and wg_prcol.gif is actually 0.  &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks for your help&lt;/p&gt;</description></item><item><title>Webgrid 8 and cleint event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-8-and-cleint-event/</link><pubDate>Mon, 17 Sep 2012 00:47:59 GMT</pubDate><dc:creator>bernard</dc:creator><description>&lt;p&gt;Hi John,&lt;/p&gt;&lt;p&gt;Sorry for this inconvenience. I forgot to put some validation on my code. Here's the fix:&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;var buttonClick = false;
function WebGrid1_OnRowSelect(controlId, tblName, rowIndex, rowEl)
{
    var WebGrid1 = ISGetObject(controlId);
    if (buttonClick == false)
    {
        var row = WebGrid1.GetSelectedObject().GetRowObject();
        if (row.Type == 'Record')
        {
            if (row.PreviewRowExpanded)
                row.CollapsePreviewRow();
            else
                row.ExpandPreviewRow();
        }
    }
    buttonClick = false;
    WebGrid1.SetStatus1("", "Ready.", "CommonText/Ready");
    return true;
}
function WebGrid1_OnCellClick(controlId, tblName, rowIndex, cellIndex, cellEl)
{
    var WebGrid1 = ISGetObject(controlId);
    if (cellIndex == 1)
    {
        var el = event.srcElement;
        if (el != null)
        {
            if (el.nameProp == "wg_prexp.gif" || el.nameProp == "wg_prcol.gif")
                buttonClick = true;
        }
    }
    return true;
}&lt;/pre&gt;
&lt;p&gt;Is this problem still occurs after you modified the code? Look forward to hear any feedback from you so I can help you further.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Bernard&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>Webgrid 8 and cleint event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-8-and-cleint-event/</link><pubDate>Fri, 14 Sep 2012 13:11:30 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;Hi Bernard,&lt;/p&gt;&lt;p&gt;I have a follow up question that may be associated with this.  If I happen to either 1) add a new column from the context menu or 2) click on a column header to sort that column only after at least viewing a preview first, it appears that the RowSelect and CellSelect events fire and the above code causes the 1st record to always expand.  I also get a JS error on the OnCellClick function listed above on the line If (el.nameProp == ...), with description of Object required. &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>Webgrid 8 and cleint event</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-8-and-cleint-event/</link><pubDate>Thu, 13 Sep 2012 14:45:15 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;I have the following client script that will expand or collapes a preview row when the users clicks anywhere on the row without requring the user to click the arrow.  Grid has the CellClickAction to RowSelect.&lt;/p&gt;
&lt;p&gt;The code works except if the user happens to click on the arrow to expand/collapse the row, if the row is already expanded it will collapse it and then expand it, if it is collapsed it will open and then collaps it.&lt;/p&gt;&lt;pre&gt;        function WebGrid1_OnRowSelect(controlId, tblName, rowIndex, rowEl) {
            var WebGrid1 = ISGetObject(controlId);
            var row = WebGrid1.GetSelectedObject().GetRowObject();

            if (row.Type == 'Record') {
                if (row.PreviewRowExpanded) {
                    row.CollapsePreviewRow();
                } else {
                    row.ExpandPreviewRow();
                };
            };
            WebGrid1.SetStatus1("", "Ready.", "CommonText/Ready")
            return true;
        }
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Any suggestions?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item></channel></rss>