﻿<?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 - Validating filter criteria before custom filter</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Validating-filter-criteria-before-custom-filter/</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>Validating filter criteria before custom filter</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Validating-filter-criteria-before-custom-filter/</link><pubDate>Tue, 11 May 2010 09:06:39 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui', sans-serif; color: rgb(31,73,125); font-size: 9pt"&gt;Glad to hear that the information helps.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui', sans-serif; color: rgb(31,73,125); 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>Validating filter criteria before custom filter</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Validating-filter-criteria-before-custom-filter/</link><pubDate>Tue, 11 May 2010 08:29:37 GMT</pubDate><dc:creator>theDiv</dc:creator><description>&lt;p&gt;thanks Yudi, just what I needed.&lt;/p&gt;</description></item><item><title>Validating filter criteria before custom filter</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Validating-filter-criteria-before-custom-filter/</link><pubDate>Mon, 10 May 2010 17:18:08 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’d like to suggest you to utilize the “&lt;strong&gt;OnBeforeRequest&lt;/strong&gt;” client side event. OnBeforeRequest client side event specifies the client side (Javascript) function that will be invoked when request action to server is about to be made.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Below is the snippet code that shows a simple sample of script that iterates through all the cells of WebGrid filter row and obtain its inner text.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;script&lt;/span&gt;&lt;span style="color: red"&gt; language&lt;/span&gt;&lt;span style="color: blue"&gt;="javascript"&lt;/span&gt;&lt;span style="color: red"&gt; type&lt;/span&gt;&lt;span style="color: blue"&gt;="text/javascript"&amp;gt;&lt;/span&gt;
    &amp;lt;!--
    &lt;span style="color: blue"&gt;function&lt;/span&gt; WebGrid1_OnBeforeRequest(controlId, action) {
        &lt;span style="color: blue"&gt;var&lt;/span&gt; WebGrid1 = ISGetObject(controlId);
        &lt;span style="color: blue"&gt;var&lt;/span&gt; rootTable = WebGrid1.RootTable;
        &lt;span style="color: blue"&gt;var&lt;/span&gt; filterRowEl = rootTable.GetFilterRow();
        &lt;span style="color: blue"&gt;var&lt;/span&gt; filterRowLength = filterRowEl.cells.length;
        &lt;span style="color: blue"&gt;var&lt;/span&gt; i = 0;

        &lt;span style="color: blue"&gt;for&lt;/span&gt; (i; i &amp;lt; filterRowLength; i&amp;#43;&amp;#43;) {
            &lt;span style="color: blue"&gt;var&lt;/span&gt; filterText = filterRowEl.cells[i].innerText;

            &lt;span style="color: green"&gt;//your validation code in here&lt;/span&gt;
        }

        &lt;span style="color: blue"&gt;return true&lt;/span&gt;;
    }
    --&amp;gt;
&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;script&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&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>Validating filter criteria before custom filter</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Validating-filter-criteria-before-custom-filter/</link><pubDate>Mon, 10 May 2010 16:00:34 GMT</pubDate><dc:creator>theDiv</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Im setting up a custom filter on the grid, using the "OnCustomFilter" event, and wondered if there is an easy way to perform some client side validation on the value(s) the user enters in the filter inputs on the grid?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;thanks&lt;span style="font-size: 13px; color: #ff0000"&gt;&lt;span style="font-size: 13px; color: #ff0000"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item></channel></rss>