# \[ANN\] WiceGrid Plugin version 0.5

**URL:** <https://www.ruby-forum.com/t/ann-wicegrid-plugin-version-0-5/177486>\
**Category:** Rails\
**Created:** [October 19, 2009, 12:08am UTC](https://www.ruby-forum.com/t/ann-wicegrid-plugin-version-0-5/177486 "2009-10-19T00:08:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuleven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/c89c15/32.png) [@yuleven](https://www.ruby-forum.com/u/yuleven)\
**Post date:** [October 19, 2009, 12:08am UTC](https://www.ruby-forum.com/t/ann-wicegrid-plugin-version-0-5/177486/1 "2009-10-19T00:08:41Z")

</div>

Hello all,

WiceGrid plugin version 0.5 is released.

WiceGrid is a Rails grid plugin.

A list of changes: [http://leikind.org/2009/10/18/wicegrid-version-0-5](http://leikind.org/2009/10/18/wicegrid-version-0-5)  
Examples online: [http://grid.leikind.org/](http://grid.leikind.org/)  
Homepage: [WiceGrid - leikind.org](http://leikind.org/pages/wicegrid)  
Source code: [GitHub - leikind/wice\_grid at v0.5](http://github.com/leikind/wice_grid/tree/v0.5)

Best regards,  
Yuri L.

---

<div class="post-metadata">

**Author:** ![yuleven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/c89c15/32.png) [@yuleven](https://www.ruby-forum.com/u/yuleven)\
**Post date:** [October 19, 2009, 1:58pm UTC](https://www.ruby-forum.com/t/ann-wicegrid-plugin-version-0-5/177486/2 "2009-10-19T13:58:43Z")

</div>

Yuri,  
That’s so cool you have an example page now!  
If this works as well as your example page I think Rails has advanced  
immeasurably and if we could find a reporting strategy, there’d be no  
stopping us.  
Huh Rah and many thanks!  
David

---

<div class="post-metadata">

**Author:** ![yuleven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/c89c15/32.png) [@yuleven](https://www.ruby-forum.com/u/yuleven)\
**Post date:** [October 19, 2009, 3:18pm UTC](https://www.ruby-forum.com/t/ann-wicegrid-plugin-version-0-5/177486/3 "2009-10-19T15:18:56Z")

</div>

Many thanks Yuri, I see the examples and they are very impressive !!!

Congratulations !!!

I have only a little question: why using prototype ? I think the most  
rails projects are using jquery…

Do you think is it possible to have a unique parameterized plugin  
working with both prototype & jquery js library ?

---

<div class="post-metadata">

**Author:** ![yuleven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/c89c15/32.png) [@yuleven](https://www.ruby-forum.com/u/yuleven)\
**Post date:** [October 19, 2009, 3:22pm UTC](https://www.ruby-forum.com/t/ann-wicegrid-plugin-version-0-5/177486/4 "2009-10-19T15:22:27Z")

</div>

On Sun, 2009-10-18 at 12:01 -0700, Yuri L. wrote:

> Best regards,  
> Yuri L.

This looks very nice. The documentation and examples are as impressive  
as the demonstrated functionality. Very well done! Your timing is very  
convenient for me too and I think I’ll be giving it a try this week.

One thing I haven’t been able to find in the documentation so far…

If I understand correctly, I can put more than just a single attribute  
value in a column. For example, assuming I have separate columns in the  
database for customer name, address, and phone number, I can put all of  
them in one display column. Yes?

Is it possible to do that AND to still have the ability to sort the grid  
based on that column? Is it possible to specify one of the elements I  
put in a column as the one to use for sorting? So that I could put  
name, address, and phone in the column, but sort/filter on name only?

Thanks for your reply, and for your contribution!

Best regards,  
Bill

---

<div class="post-metadata">

**Author:** ![yuleven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/c89c15/32.png) [@yuleven](https://www.ruby-forum.com/u/yuleven)\
**Post date:** [October 19, 2009, 4:50pm UTC](https://www.ruby-forum.com/t/ann-wicegrid-plugin-version-0-5/177486/5 "2009-10-19T16:50:16Z")

</div>

On Oct 19, 3:20 pm, bill walton [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Source code:[GitHub - leikind/wice\_grid at v0.5](http://github.com/leikind/wice_grid/tree/v0.5)
> 
> > Best regards,  
> > Yuri L.
> 
> This looks very nice. The documentation and examples are as impressive  
> as the demonstrated functionality. Very well done!

Thanks!

> If I understand correctly, I can put more than just a single attribute  
> value in a column. For example, assuming I have separate columns in the  
> database for customer name, address, and phone number, I can put all of  
> them in one display column. Yes?

Yes

> Is it possible to do that AND to still have the ability to sort the grid  
> based on that column?

On just one column, yes.

What you have inside the column block technically doesn’t have to do  
anything with how you filter/order, etc, so you can  
have the following:

g.column :attribute\_name =\> ‘firstname’ do |person|  
person.firstname + ’ ’ + person.lastname + ’ ’ + person.telephone  
end

> Is it possible to specify one of the elements I  
> put in a column as the one to use for sorting? So that I could put  
> name, address, and phone in the column, but sort/filter on name only?

Yes. In the column clause you define the column you want to filter by,  
and then you redefine which column you want to use for ordering using  
:custom\_order. see the example at  
[http://grid.leikind.org/custom\_ordering2](http://grid.leikind.org/custom_ordering2),  
controller code, or here [http://grid.leikind.org/custom\_filters2](http://grid.leikind.org/custom_filters2) .  
Basically,  
the key of the hash is the database column defined in your column  
clause,  
and the value is any other column you want to use for ordering, or any  
valid sql expression (see here [http://grid.leikind.org/custom\_ordering](http://grid.leikind.org/custom_ordering),  
controller code)

Best regards,  
Yuri

---

<div class="post-metadata">

**Author:** ![yuleven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/c89c15/32.png) [@yuleven](https://www.ruby-forum.com/u/yuleven)\
**Post date:** [October 19, 2009, 5:42pm UTC](https://www.ruby-forum.com/t/ann-wicegrid-plugin-version-0-5/177486/6 "2009-10-19T17:42:21Z")

</div>

Wonderful Yuri,

keep up the good work !!!

---

<div class="post-metadata">

**Author:** ![yuleven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/c89c15/32.png) [@yuleven](https://www.ruby-forum.com/u/yuleven)\
**Post date:** [October 19, 2009, 4:58pm UTC](https://www.ruby-forum.com/t/ann-wicegrid-plugin-version-0-5/177486/7 "2009-10-19T16:58:28Z")

</div>

On Oct 19, 3:17 pm, Gianluca T.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Many thanks Yuri, I see the examples and they are very impressive !!!

Thanks Gianluca!

> Congratulations !!!
> 
> I have only a little question: why using prototype ? I think the most  
> rails projects are using jquery…

As you can guess, it’s because the projects out of which WiceGrid was  
extracted were  
Prototype based :), but you are right, I see no point why it cannot be  
done.  
Support for both jQuery and Prototype is planned for the next version  
0.6,  
so bear with me 🙂

> Do you think is it possible to have a unique parameterized plugin  
> working with both prototype & jquery js library ?

Absolutely.

Best regards,  
Yuri L.

> > Examples online:[http://grid.leikind.org/](http://grid.leikind.org/)  
> > Homepage:[WiceGrid - leikind.org](http://leikind.org/pages/wicegrid)  
> > Source code:[GitHub - leikind/wice\_grid at v0.5](http://github.com/leikind/wice_grid/tree/v0.5)
> 
> > Best regards,  
> > Yuri L.

Best regards,  
Yuri L.
