PDA

View Full Version : [CLOSED] GridView GetRowClass Args Property



Timothy
Sep 07, 2008, 3:59 PM
Hello,

Would appear that the Args property is being ignored on the GetRowClass control:



<ExtJS:GridView runat="server" EnableRowBody="True">
<GetRowClass Args="record, rowIndex, p, store" Handler="p.body = 'Hello World'" />
</ExtJS:GridView>


Generated code from Coolite:



...
getRowClass:function(record,index,rowParams,store) {p.body = 'Hello World'}
...


Hope this helps :)

Cheers,
Timothy

geoffrey.mcgill
Sep 07, 2008, 4:34 PM
Hi Timothy,

Funny you should bring this up... we discussed the serialization of the GetRowClass at length yesterday and made the decision to hard-code the Args instead of requiring the developer to manually add. The functionality is now consistent with how the Listener serialization works where if the .Handler property is set a function template will be created and the proper arguments will be passed. 


If the <GetRowClass> .Handler property is set, a function template will be created and the four arguments (record,index,rowParams,store) will be passed when the config script is created.


If the .Fn property is set, the value is serialized as a raw string and no template is created. 


Long story short... don't set the Args and expect (record, index, rowParams, store) to be passed as arguments if using the .Handler property. 


I'm going to look into trying to hide the .Args property, although we would have to create a new class, which is why we didn't do it in the first place.


All reference to the .Args property have been removed from samples within the project. If you happen to find any other, please point them out and I'll have them stricken from the record.  


Hope this helps.

Timothy
Sep 07, 2008, 4:36 PM
Good to know, I only chirped up because I was using the Args based on this example previous discussed:

http://forums.ext.net/showthread.php?threadid=1459-4-1.aspx?Highlight=getrowclass

Thanks, I'll remove Args from my usage from here on.

Cheers,
Timothy

geoffrey.mcgill
Sep 07, 2008, 4:44 PM
Thanks for the update. I've revised the samples to not include the .Args property and just use the default four params as noted above.