﻿<?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 - WebDesktop - WebGrid, TotalRows stay coutning 0 after adding the first row on client binding mode</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebGrid-TotalRows-stay-coutning-0-after-adding-the-first-row-on-client-binding-mode/</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, TotalRows stay coutning 0 after adding the first row on client binding mode</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebGrid-TotalRows-stay-coutning-0-after-adding-the-first-row-on-client-binding-mode/</link><pubDate>Mon, 21 Feb 2011 05:02:39 GMT</pubDate><dc:creator>yudi</dc:creator><category>WebGrid</category><category>cleintside binding</category><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Please try to obtain the total rows by using following snippet code.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;WebGrid1.RootTable.Rows.length&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;I have tested that the "Rows.length" returns correct amount of total loaded rows of WebGrid. I also have tested the scenario where the Grid starts with empty grid (no rows).&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>WebGrid, TotalRows stay coutning 0 after adding the first row on client binding mode</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebGrid-TotalRows-stay-coutning-0-after-adding-the-first-row-on-client-binding-mode/</link><pubDate>Sun, 20 Feb 2011 20:12:06 GMT</pubDate><dc:creator>yudi</dc:creator><category>WebGrid</category><category>cleintside binding</category><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt;"&gt;I’m currently still investigating this issue and need more time to provide you with solution, suggestion, or sample.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt;"&gt;I’ll get back to you as soon as possible.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid, TotalRows stay coutning 0 after adding the first row on client binding mode</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebGrid-TotalRows-stay-coutning-0-after-adding-the-first-row-on-client-binding-mode/</link><pubDate>Wed, 16 Feb 2011 00:08:42 GMT</pubDate><dc:creator>mmikaeel2</dc:creator><category>WebGrid</category><category>cleintside binding</category><description>&lt;p&gt;Just to confirm it with you. You need to start with very empty grid that has no rows, and just add a new row and don't refresh, and then try to have a button that call a client side function that just display the grid TotalRows.&lt;/p&gt;&lt;p&gt;Please send me your sample to compare it with my code.&lt;/p&gt;
&lt;p&gt;I can not send you my code as its large project that has many dependencies. But here is snapshot:&lt;/p&gt;
&lt;p&gt;The grid definition:&lt;/p&gt;&lt;pre&gt;&amp;lt;ISWebGrid:WebGrid ID="MembershipTypePricesWebGrid" runat="server" DefaultStyleMode="Win7" Height="340px"&lt;br /&gt;                                                                            UseDefaultStyle="True" Width="99%" BindingOperationMode="ClientBinding"&amp;gt;&lt;br /&gt;                                                                        &lt;br /&gt;                                                                        &amp;lt;LayoutSettings AllowEdit="Yes" AllowSorting="Yes" AlwaysShowHelpButton="False"&lt;br /&gt;                                                                            InProgressUIBehavior="ChangeCursorToHourGlass" RowHeaders="Default" ShowRefreshButton="True"&lt;br /&gt;                                                                            StatusBarVisible="True" TreeLines="False" AllowAddNew="Yes" EditOnClick="True"&lt;br /&gt;                                                                            AllowColumnSizing="No" AllowContextMenu="False" NewRowLostFocusAction="AlwaysPrompt"&amp;gt;&lt;br /&gt;                                                                            &lt;br /&gt;                                                                            &amp;lt;ClientSideEvents&lt;br /&gt;                                                                                OnBeginRowEditing="CheckNewRowsAddedToGrid"&lt;br /&gt;                                                                                OnBeforeRowSelect="CheckNewRowsAddedToGrid" /&amp;gt;&lt;br /&gt;                                                                            &lt;br /&gt;                                                                            &amp;lt;NewRowStyle BackColor="#FBF7AE" BackColor2="AliceBlue" BaseStyle="Active" Cursor="Text" Font-Italic="True" &amp;gt;&lt;br /&gt;                                                                            &amp;lt;/NewRowStyle&amp;gt;&lt;br /&gt;                                                                        &amp;lt;/LayoutSettings&amp;gt;&lt;br /&gt;                                                                        &lt;br /&gt;                                                                        &amp;lt;RootTable Caption="MembershipTypeProduct" DataKeyField="MembershipTypePriceID"&amp;gt;&lt;br /&gt;                                                                            &amp;lt;Columns&amp;gt;&lt;br /&gt;                                                                                &amp;lt;ISWebGrid:WebGridColumn Caption="Effective Date" DataMember="EffectiveDate" &lt;br /&gt;                                                                                    Name="EffectiveDate" Width="240px" EditType="CalendarDropdown" &lt;br /&gt;                                                                                    DataFormatString="d" DataType="System.Date"&amp;gt;&lt;br /&gt;                                                                                    &amp;lt;HeaderStyle Cursor="Hand" Font-Italic="True" Font-Underline="True" HorizontalAlign="Center" /&amp;gt;&lt;br /&gt;                                                                                &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;&lt;br /&gt;                                                                                &lt;br /&gt;                                                                                &amp;lt;ISWebGrid:WebGridColumn Caption="Member Category" DataMember="MemberCategoryName" &lt;br /&gt;                                                                                    DataType="System.String" EditType="WebComboNET" Name="MemberCategoryName" &lt;br /&gt;                                                                                    WebComboID="PricesMemberCategoryCombo" Width="240px"&amp;gt;&lt;br /&gt;                                                                                    &amp;lt;HeaderStyle Cursor="Hand" Font-Italic="True" Font-Underline="True" HorizontalAlign="Center" /&amp;gt;&lt;br /&gt;                                                                                &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;&lt;br /&gt;                                                                                &lt;br /&gt;                                                                                &amp;lt;ISWebGrid:WebGridColumn Caption="Member Charge" DataMember="MemberPrice" Name="MemberPrice" Width="240px"&amp;gt;&lt;br /&gt;                                                                                    &amp;lt;HeaderStyle Cursor="Hand" Font-Italic="True" Font-Underline="True" HorizontalAlign="Center" /&amp;gt;&lt;br /&gt;                                                                                &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;&lt;br /&gt;                                                                                &lt;br /&gt;                                                                                &amp;lt;ISWebGrid:WebGridColumn Caption="ID" DataMember="MembershipTypePriceID" Name="MembershipTypePriceID" Width="70px"&lt;br /&gt;                                                                                    EditType="NoEdit" Visible="false"&amp;gt;&lt;br /&gt;                                                                                    &amp;lt;HeaderStyle Cursor="Hand" Font-Italic="True" Font-Underline="True" HorizontalAlign="Center" /&amp;gt;&lt;br /&gt;                                                                                &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;&lt;br /&gt;                                                                            &amp;lt;/Columns&amp;gt;&lt;br /&gt;                                                                        &amp;lt;/RootTable&amp;gt;&lt;br /&gt;                                                                        &lt;br /&gt;                                                                        &amp;lt;ClientBindingSettings DataSourceType="WebService" ServiceUrl="../MembershipDataService.asmx"&lt;br /&gt;                                                                            DataLoadMode="AllData" ItemTypeName="MembershipTypePrice" &amp;gt;&lt;br /&gt;                                                                            &amp;lt;ServiceMethods&lt;br /&gt;                                                                                SelectMethod="GetMembershipTypePrices"&lt;br /&gt;                                                                                UpdateMethod="UpdateMembershipTypePrices"&lt;br /&gt;                                                                                InsertMethod="InsertMembershipTypePrice" /&amp;gt;&lt;br /&gt;                                                                            &amp;lt;ServiceEvents&lt;br /&gt;                                                                                Selecting="Selecting_MembershipTypeItem"&lt;br /&gt;                                                                                Updating="Updating_MembershipTypePrice"&lt;br /&gt;                                                                                Inserting="Inserting_MembershipTypePrice" /&amp;gt;&lt;br /&gt;                                                                        &amp;lt;/ClientBindingSettings&amp;gt;&lt;br /&gt;                                                                    &amp;lt;/ISWebGrid:WebGrid&amp;gt;&lt;br /&gt;                                                                &amp;lt;/PageTemplate&amp;gt;&lt;br /&gt;                                                            &amp;lt;/ISWebDesktop:WebTabItem&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;The function to calculate the total rows:&lt;/p&gt;&lt;pre&gt;///&lt;br /&gt;            ///&lt;br /&gt;            ///&lt;br /&gt;            function CheckNewRowsAddedToGrid(controlId)&lt;br /&gt;            {&lt;br /&gt;                try&lt;br /&gt;                {&lt;br /&gt;                    var grid = ISGetObject(controlId);&lt;br /&gt;&lt;br /&gt;                    for (var i = 0; i &amp;lt; grid.TotalRows; i&amp;#43;&amp;#43;)&lt;br /&gt;                    {&lt;br /&gt;                        var row = grid.RootTable.GetRow(i);&lt;br /&gt;                        if(row.KeyValue &amp;lt; 1)&lt;br /&gt;                        {&lt;br /&gt;                            grid.Refresh();&lt;br /&gt;                            return false;&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;                catch (err)&lt;br /&gt;                {&lt;br /&gt;                    alert("CheckNewRowsAddedToGrid: " &amp;#43; err.description);&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;                return true;&lt;br /&gt;            }&lt;/pre&gt;
&lt;p&gt;Please try to replicate this code at your sample.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Maged&lt;br /&gt;&lt;/p&gt;</description></item><item><title>WebGrid, TotalRows stay coutning 0 after adding the first row on client binding mode</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebGrid-TotalRows-stay-coutning-0-after-adding-the-first-row-on-client-binding-mode/</link><pubDate>Tue, 15 Feb 2011 20:26:56 GMT</pubDate><dc:creator>yudi</dc:creator><category>WebGrid</category><category>cleintside binding</category><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt;"&gt;I tested the issue in a simple sample of Client-Binding WebGrid and was unable to reproduce the issue on my local end.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt;"&gt;I’m afraid that there is something that I missed during my attempt in order to replicate the issue. I’m willing to advice you further but in order to do so I would need you to elaborate on your specific scenario and possibly give me a running simple sample that I can use to observe the problematic behavior.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid, TotalRows stay coutning 0 after adding the first row on client binding mode</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebGrid-TotalRows-stay-coutning-0-after-adding-the-first-row-on-client-binding-mode/</link><pubDate>Tue, 15 Feb 2011 10:11:31 GMT</pubDate><dc:creator>mmikaeel2</dc:creator><category>WebGrid</category><category>cleintside binding</category><description>&lt;p&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState="false" LatentStyleCount="156"&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin:0cm;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";
	mso-ansi-language:#0400;
	mso-fareast-language:#0400;
	mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="undefined" style=""&gt;Hi,&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span lang="undefined" style=""&gt;&lt;span style=""&gt; &lt;/span&gt;I’ve WebGrid, and defined &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;courier new&amp;quot;; color: red;"&gt;BindingOperationMode&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;courier new&amp;quot;; color: blue;"&gt;="ClientBinding"
&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;courier new&amp;quot;; color: red;"&gt;AllowAddNew&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;courier new&amp;quot;; color: blue;"&gt;="Yes".&lt;/span&gt;&lt;span style=""&gt; &lt;span lang="undefined"&gt;Also set &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;courier new&amp;quot;; color: red;"&gt;DataSourceType&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;courier new&amp;quot;; color: blue;"&gt;="WebService".&lt;/span&gt;&lt;span style=""&gt; &lt;span style=""&gt; &lt;/span&gt;&lt;span lang="undefined" /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span lang="undefined" style=""&gt;If the grid
is empty and has 0 rows, and after adding the first rows, and trying to check &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;courier new&amp;quot;;"&gt;grid.TotalRows&lt;/span&gt;&lt;span style=""&gt; &lt;span lang="undefined"&gt;it always return 0 unless I
refresh the grid which is causing some issues to my application.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span lang="undefined" style=""&gt;Can you
please check it and let me know?&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span lang="undefined" style=""&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;span lang="undefined" style="font-size: 12pt; font-family: &amp;quot;times new roman&amp;quot;;"&gt;Maged Mikaeel&lt;/span&gt;</description></item></channel></rss>