﻿<?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 - Display Filtered Row Count w/ Paging Enabled</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Display-Filtered-Row-Count-w-Paging-Enabled/</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>Display Filtered Row Count w/ Paging Enabled</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Display-Filtered-Row-Count-w-Paging-Enabled/</link><pubDate>Thu, 17 Jun 2010 00:08:02 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;A workaround if you would like to use classic paging would be to retrieve the filtered row count during InitializePostBack server side event handler and invoke javascript function to render the information. Here is the snippet, the client side snippet will try to render a new TD element in the WebGrid status bar:&lt;/p&gt;&lt;pre&gt;//Server code&lt;br /&gt;protected void wgTest_InitializePostBack(object sender, PostbackEventArgs e)&lt;br /&gt;{&lt;br /&gt;    switch (e.Action)&lt;br /&gt;    {&lt;br /&gt;        case "ColumnFilter":&lt;br /&gt;            int filterCount = ((System.Data.DataTable)(wgTest.DataSource)).DefaultView.Count;&lt;br /&gt;            wgTest.ClientAction.InvokeScript("RenderFilterCount", new FunctionParameter[] { new FunctionParameter(filterCount.ToString(), "string")}); &lt;br /&gt;            break;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;pre&gt;//Client side code&lt;br /&gt;function RenderFilterCount(count)&lt;br /&gt;{&lt;br /&gt;    var grid = ISGetObject("wgTest");&lt;br /&gt;    var customStat = document.getElementById("tdCustomStat_" &amp;#43; grid.Id);&lt;br /&gt;&lt;br /&gt;    if (customStat)&lt;br /&gt;    {&lt;br /&gt;        customStat.getElementsByTagName("div")[0].innerHTML = "Filtered row: " &amp;#43; count;&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;        var statBar = grid.GetElement(WG40.STATUSBAR, WG40.HTMLCELL);&lt;br /&gt;&lt;br /&gt;        var filterCountDiv = document.createElement("div");&lt;br /&gt;        filterCountDiv.innerHTML = "Filtered row: " &amp;#43; count;&lt;br /&gt;&lt;br /&gt;        var filterCountDivCont = document.createElement("td");&lt;br /&gt;        filterCountDivCont.setAttribute("id", "tdCustomStat_" &amp;#43; grid.Id);&lt;br /&gt;        filterCountDivCont.setAttribute("noWrap", "nowrap");&lt;br /&gt;        filterCountDivCont.appendChild(filterCountDiv);&lt;br /&gt;&lt;br /&gt;        var sepElem = statBar.nextSibling;&lt;br /&gt;&lt;br /&gt;        sepElem.parentNode.insertBefore(filterCountDivCont, sepElem);&lt;br /&gt;        sepElem.parentNode.insertBefore(sepElem.cloneNode(true), filterCountDivCont);&lt;br /&gt;    }  &lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Display Filtered Row Count w/ Paging Enabled</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Display-Filtered-Row-Count-w-Paging-Enabled/</link><pubDate>Wed, 16 Jun 2010 23:06:24 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;The “&lt;strong&gt;Loaded x of y&lt;/strong&gt;” information that showed in WebGrid status bar will be replaced by &lt;strong&gt;ClassicPaging UI (FirstPrevNextLast style; SimpleDropDown style; Slider style)&lt;/strong&gt; when &lt;strong&gt;PagingMode&lt;/strong&gt; is set to “&lt;strong&gt;ClassicPaging&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;If PagingMode is set either to “None” or “VirtualLoad”, the “Loaded x of y” information will still available in WebGrid status bar. So, the most suitable solution for your required scenario, to display the number of filtered rows while also allowing paging, is by using VirtualLoad paging.&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>Display Filtered Row Count w/ Paging Enabled</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Display-Filtered-Row-Count-w-Paging-Enabled/</link><pubDate>Wed, 16 Jun 2010 11:29:21 GMT</pubDate><dc:creator>bloveall</dc:creator><description>&lt;p&gt;When PagingMode is set to None, the phrase "Loaded x of x" displays in the bottom right of the grid, both in filtered and non-filtered scenarios. When, however, PagingMode is set to some value other than None, that text disappears and is replaced with the paging control. How do we display the number of filtered rows while also allowing paging?&lt;/p&gt;
&lt;p&gt;Brad&lt;/p&gt;</description></item></channel></rss>