﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ayende Rahien commented on Having Fun with SmartGridComponent</title><description>The SmartGridComponent is going to move to the Castle Contrib, to a project that would aggregate all the common components.
  
I just need to dedicate some time to actually finish this...
  
  
How are you going to handle the sorting?
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment21</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment21</guid><pubDate>Mon, 30 Apr 2007 01:56:59 GMT</pubDate></item><item><title>hammett commented on Having Fun with SmartGridComponent</title><description>We could at least list them on http://using.castleproject.org
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment20</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment20</guid><pubDate>Mon, 30 Apr 2007 00:34:12 GMT</pubDate></item><item><title>Tim Haines commented on Having Fun with SmartGridComponent</title><description>Hi Ayende,
  
  
Interesting to see your work on this.  The SmartGridComponent seems like it would be valuable to a lot of people that use Monorail.  I've not yet grokked monorail enough to know if there's a place for contributed components?  I'd like to use this, and extend it so clicking the column headers sorts the columns, add filters etc.
  
  
Having the component source live in a source repository for your demo app doesn't seem like a good place for a lot of people to reuse and improve it though.  
  
  
What are your thoughts on this?
  
  
Cheers,
  
  
Tim.
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment19</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment19</guid><pubDate>Sun, 29 Apr 2007 22:52:34 GMT</pubDate></item><item><title>Adam B commented on Having Fun with SmartGridComponent</title><description>Ah yes, thanks, this worked:
  
  
#set ($cols = ["Code", "Company", "Website", "Description", "PrimaryKey"])
  
#blockcomponent(SmartGridComponent with "source=$results" "columns=$cols")
  
	#PrimaryKeyHeader
  
		&lt;th&gt;&lt;/th&gt;
  
	#end
  
	#PrimaryKey
  
		&lt;td&gt;$HtmlHelper.LinkTo('Edit', 'account', 'edit', $item)&lt;/td&gt;
  
		&lt;td&gt;$HtmlHelper.LinkTo('Delete', 'account', 'delete', $item)&lt;/td&gt;
  
	#end
  
#end
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment18</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment18</guid><pubDate>Mon, 16 Apr 2007 08:09:20 GMT</pubDate></item><item><title>Ayende Rahien commented on Having Fun with SmartGridComponent</title><description>@Adam,
  
Yes, it is, just add them to the last column definition, and it would work
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment17</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment17</guid><pubDate>Sun, 15 Apr 2007 23:38:14 GMT</pubDate></item><item><title>Ayende Rahien commented on Having Fun with SmartGridComponent</title><description>The ItemDataBound event is the reason that I am calling this PITA.
  
You have to workaround the control model to get what you want.
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment16</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment16</guid><pubDate>Fri, 13 Apr 2007 11:48:35 GMT</pubDate></item><item><title>Simone Busoli commented on Having Fun with SmartGridComponent</title><description>Didn't have time yet to check out your screencast, but I still don't get the point. Furthermore looks to me like your performing logic tasks in the view, what about using the ItemDataBound event of the ASP.NET web controls?
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment15</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment15</guid><pubDate>Fri, 13 Apr 2007 11:39:54 GMT</pubDate></item><item><title>Ayende Rahien commented on Having Fun with SmartGridComponent</title><description>Simone,
  
The idea here is not the formatting.
  
The idea is the ease of using presentation logic.
  
If I want to display in red based on a certain condition:
  
  
&lt;% section customerName:
  
  if Controller.IsCustomerInDebt(item):
  
     output "&lt;td style='background-color: red'&gt;${value}&lt;/td&gt;"
  
  end
  
end %&gt;
  
  
Add several more condition, and a more complex UI requirements, and using web controls became a real PITA.
  
  
I did a screen cast on this subject, which you can watch here:
  
http://www.ayende.com/hibernating-rhinos.aspx
  
  
I hope it would make it clearer
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment14</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment14</guid><pubDate>Fri, 13 Apr 2007 08:32:00 GMT</pubDate></item><item><title>Simone Busoli commented on Having Fun with SmartGridComponent</title><description>Looks to me like nothing you can't do with a Repeater as well, while a lot more like you're just trying to emulate what web controls do.
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment13</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment13</guid><pubDate>Fri, 13 Apr 2007 00:42:37 GMT</pubDate></item><item><title>Ayende Rahien commented on Having Fun with SmartGridComponent</title><description>@Simone,
  
Please check out this post:
  
http://ayende.com/Blog/archive/2007/04/08/Building-View-Components-For-MonoRail.aspx
  
  
Those are the capabilities that I am referring to, not just the basic of it.
  
Sorting and paging in the UI layer are a bad practice, mostly because it performs horribly the moment you put evena  moderate amount of data into the system
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment12</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment12</guid><pubDate>Fri, 13 Apr 2007 00:30:54 GMT</pubDate></item><item><title>Simone Busoli commented on Having Fun with SmartGridComponent</title><description>Here's the code for a GrediView with the same UI.And you get sorting paging and a lot more for free:
  
  
&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"&gt;
  
            &lt;Columns&gt;
  
                &lt;asp:HyperLinkField DataNavigateUrlFields="CustomerID" DataNavigateUrlFormatString="ListOrder.aspx?id={0}"
  
                    DataTextField="CustomerID" HeaderText="Id" SortExpression="CustomerID" /&gt;
  
                &lt;asp:BoundField DataField="CompanyName" HeaderText="Company Name" SortExpression="CompanyName" /&gt;
  
                &lt;asp:BoundField DataField="ContactName" HeaderText="Contact Name" SortExpression="ContactName" /&gt;
  
                &lt;asp:BoundField DataField="ContactTitle" HeaderText="Contact Title" SortExpression="ContactTitle" /&gt;
  
            &lt;/Columns&gt;
  
        &lt;/asp:GridView&gt;
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment11</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment11</guid><pubDate>Fri, 13 Apr 2007 00:19:54 GMT</pubDate></item><item><title>Ayende Rahien commented on Having Fun with SmartGridComponent</title><description>@Simone,
  
Why, yes I did.
  
Feel free to try to generate the same client UI for the grid view, I would be interested in seeing it.
  
The kind of things that I presenting here are nearly impossible to handle cleanly with those controls.
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment10</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment10</guid><pubDate>Thu, 12 Apr 2007 20:49:30 GMT</pubDate></item><item><title>Simone Busoli commented on Having Fun with SmartGridComponent</title><description>Ever heard of Repeater, DataList and GridView?
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment9</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment9</guid><pubDate>Thu, 12 Apr 2007 20:44:53 GMT</pubDate></item><item><title>Adam B commented on Having Fun with SmartGridComponent</title><description>I am using your smart grid component now exactly as you have described here albeit with NVelocity. It's really nice to use.
  
  
I was wondering, is it possible to add extra columns that are not bound to the source, such as an edit and delete column? Perhaps passing in an id for the $item value so to use $HtmlHelper.LinkTo('Edit', 'customers', 'edit', $item). I haven't been able to figure it out.
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment8</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment8</guid><pubDate>Thu, 12 Apr 2007 10:15:32 GMT</pubDate></item><item><title>Ayende Rahien commented on Having Fun with SmartGridComponent</title><description>@Jose,
  
http://rhino-tools.svn.sourceforge.net/viewvc/rhino-tools/trunk/SampleApplications/Exesto/Rhino.Components/
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment7</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment7</guid><pubDate>Sat, 07 Apr 2007 20:12:25 GMT</pubDate></item><item><title>Ayende Rahien commented on Having Fun with SmartGridComponent</title><description>Definitely teasing, I have got a secret agenda that I want to carry on for a while
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment6</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment6</guid><pubDate>Thu, 05 Apr 2007 22:38:27 GMT</pubDate></item><item><title>Brendan Rice commented on Having Fun with SmartGridComponent</title><description>Nice work Ayende.  Are you teasing us or are you going to show us the source?
  
  
I found this great link the other day, I just had to share:
  
  
http://icant.co.uk/csstablegallery/index.php?css=20#r20
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment5</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment5</guid><pubDate>Thu, 05 Apr 2007 22:32:34 GMT</pubDate></item><item><title>Jose commented on Having Fun with SmartGridComponent</title><description>Nice code to a nice result. Where can I find the SmartGridComponent?
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment4</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment4</guid><pubDate>Thu, 05 Apr 2007 12:44:38 GMT</pubDate></item><item><title>Richard LOPES commented on Having Fun with SmartGridComponent</title><description>Hi,
  
  
I like this kind of code ! Looks like Rails.
  
In fact, Rails made me also build my components thinking convention over configuration. Simple ideas like that make our developer's lives easier !
  
  
I often think: Why should things be complicated ?
  
And what is a good programmer if not a lazy one ?
  
  
Thanks.
  
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment3</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment3</guid><pubDate>Thu, 05 Apr 2007 11:46:34 GMT</pubDate></item><item><title>Ayende Rahien commented on Having Fun with SmartGridComponent</title><description>It is not supported at the moment, but yes, that is trivially possible
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment2</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment2</guid><pubDate>Thu, 05 Apr 2007 10:22:45 GMT</pubDate></item><item><title>Anders commented on Having Fun with SmartGridComponent</title><description>Is it possible to do something like @customerCompany.Name?
</description><link>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment1</link><guid>http://ayende.com/2291/having-fun-with-smartgridcomponent#comment1</guid><pubDate>Thu, 05 Apr 2007 06:36:27 GMT</pubDate></item></channel></rss>