<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Iwo Banaś - Flex Blog &#187; search</title>
	<atom:link href="http://www.iwobanas.com/tag/search/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iwobanas.com</link>
	<description>Adobe Flex and AIR thoughts, custom components, how-to’s...</description>
	<lastBuildDate>Tue, 02 Feb 2010 22:54:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>DataGrid with client-side filtering and searching</title>
		<link>http://www.iwobanas.com/2009/06/datagrid-with-client-side-filtering-and-searching/</link>
		<comments>http://www.iwobanas.com/2009/06/datagrid-with-client-side-filtering-and-searching/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 22:47:03 +0000</pubDate>
		<dc:creator>Iwo Banas</dc:creator>
				<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[reusable components]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[Flex 3]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://www.iwobanas.com/?p=83</guid>
		<description><![CDATA[I am working on reusable Flex 3 DataGrid extension allowing client-side filtering and searching, and probably many other features in the future. Although it is not finished yet I decided to publish the result of my work to get some feedback from you:-)
The project source repository is located at http://code.google.com/p/reusable-fx/
You can also view source of [...]]]></description>
			<content:encoded><![CDATA[<p>I am working on reusable Flex 3 DataGrid extension allowing client-side filtering and searching, and probably many other features in the future. Although it is not finished yet I decided to publish the result of my work to get some feedback from you:-)</p>
<p>The project source repository is located at <a href="http://code.google.com/p/reusable-fx/">http://code.google.com/p/reusable-fx/</a><br />
You can also <a href="http://www.iwobanas.com/wp-content/uploads/data_grid_02/srcview/index.html" target="_blank">view source</a> of the example below.</p>
<p><span id="more-83"></span></p>
<p>I consider few things extremely important when creating new components:</p>
<h3>Reusability</h3>
<p>New DataGrid component should work not only for one cool demo but could be reused and reconfigured in many different applications. Every newly added element should support styling and/or skinning.</p>
<h3>Extensibility</h3>
<p>New DataGrid should allow further extension without need to rewrite too much code. During implementation of new features standard, well documented interfaces and patterns should be created to make further development easier. For example current version support filtering of text and numerical data but creation of filter for date ranges or images should be straightforward.</p>
<h3>Compatibility</h3>
<p>Compatibility with standard Flex DataGrid should be regarded very important and every incompatibilities should be well documented. For example one should be able to use filtering on one column when leaving other columns unchanged. Newly created interfaces should be similar to those known from standard Flex components.</p>
<p>I am trying to follow the rules above but of course it is not always possible. Especially if you are working on something for a long time it is difficult to tell what is intuitive for “ordinary user”. So if you play with example below and found something which in your opinion should work differently don’t hesitate to add a comment or create new issue on <a href="http://code.google.com/p/reusable-fx/issues/list">http://code.google.com/p/reusable-fx/issues/list</a> !</p>
<h3>Summary</h3>
<p>MDataGrid can be used just like standard DataGrid: you define a <code>dataProvider</code> and <code>columns</code> either in MXML or in ActionScript. If you want a column to allow filtering replace DataGridColumn with MDataGridColumn which by default has a text wildcard filtering enabled. If you prefer to filter column in a different way change <code>filterEditor</code> property of the column to point to some filter editor from <code>com.iwobanas.controls.dataGridClasses.filterEditors</code> package. You can find more information in the ASDoc in the source code. </p>
<h3>Example</h3>
<p>This example demonstrates live searching and filtering MDataGrid with about 400 rows.<br />
<a title="Sources" href="http://www.iwobanas.com/wp-content/uploads/data_grid_02/srcview/index.html" target="_blank">View source</a> is enabled, you can download zipped sources from <a title="MDataGrid sources" href="http://www.iwobanas.com/wp-content/uploads/data_grid_02/srcview/DataGrid02.zip">here</a>. </p>
<p>For better experience <a href="http://www.iwobanas.com/wp-content/uploads/data_grid_02/DataGridExample.html" target="_blank">open example in separate window</a>.</p>
<p><iframe src="http://www.iwobanas.com/wp-content/uploads/data_grid_02/DataGridExample.html" width="100%" height="350" frameborder="no"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwobanas.com/2009/06/datagrid-with-client-side-filtering-and-searching/feed/</wfw:commentRss>
		<slash:comments>76</slash:comments>
		</item>
		<item>
		<title>Searchable DataGrid</title>
		<link>http://www.iwobanas.com/2009/06/searchable-datagrid/</link>
		<comments>http://www.iwobanas.com/2009/06/searchable-datagrid/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 14:49:24 +0000</pubDate>
		<dc:creator>Iwo Banas</dc:creator>
				<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[reusable components]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex 3]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://www.iwobanas.com/?p=51</guid>
		<description><![CDATA[Although standard Flex 3 DataGrid implements findString() function it is not really usable. Searching only the first column or the column with sorting enabled is definitely not intuitive and skipping to the next match on every keystroke is confusing. Furthermore calling to findString() changes selected index without highlighting matching text so in DataGrid with many [...]]]></description>
			<content:encoded><![CDATA[<p>Although standard Flex 3 DataGrid implements findString() function it is not really usable. Searching only the first column or the column with sorting enabled is definitely not intuitive and skipping to the next match on every keystroke is confusing. Furthermore calling to findString() changes selected index without highlighting matching text so in DataGrid with many columns it may be hard to figure out where the matching text is located.</p>
<p>Given above I decided to create new more flexible and reusable searching mechanism for DataGrid. As I was working on it I realized that other components (e.g. TextArea) may also support searching. That’s why I decided to create <a href="http://www.iwobanas.com/wp-content/uploads/data_grid_01/srcview/source/com/iwobanas/core/ISearchable.as.html">ISearchable</a> interface to be implemented by every component supporting searching.</p>
<p>I also decided that searching should support standard wildcards like “*” or “?” so I created <a href="http://www.iwobanas.com/wp-content/uploads/data_grid_01/srcview/source/com/iwobanas/utils/WildcardUtils.as.html">WlidcardUtils</a> class to convert wildcards to regular expressions which are internally used by my searching mechanism. I know that regular expressions aren’t very fast so maybe one day I will write my own mechanism for matching wildcards but for now RegExp’s are enough.</p>
<p><span id="more-51"></span></p>
<p>To support searched text to be highlighted I have implemented <a href="http://www.iwobanas.com/wp-content/uploads/data_grid_01/srcview/source/com/iwobanas/controls/dataGridClasses/BoldSearchItemRenderer.as.html">BoldSearchItemRenderer</a> which can be used instead of standard DataGridItemRenderer.</p>
<p>Finally I have extended <a href="http://www.iwobanas.com/wp-content/uploads/data_grid_01/srcview/source/com/iwobanas/controls/DataGrid.as.html">DataGrid</a> to implement ISearchable interface. I haven’t named it SearchableDataGrid since I am going to add many other features later and as AdvancedDataGrid name was in use too I decided to leave the name DataGrid changing only the package.</p>
<p>This example demonstrates live searching DataGrid with about 400 rows.<br />
<a title="Sources" href="http://www.iwobanas.com/wp-content/uploads/data_grid_01/srcview/index.html" target="_blank">View source</a> is enabled, you can download zipped sources from <a title="Searchable DataGrid sources" href="http://www.iwobanas.com/wp-content/uploads/data_grid_01/srcview/DataGrid01.zip">here</a>.</p>
<p><iframe src="http://www.iwobanas.com/wp-content/uploads/data_grid_01/DataGridExample.html" width="100%" height="350" frameborder="no"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iwobanas.com/2009/06/searchable-datagrid/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
