-
14 May 2009 9:05 AM #511
It does work. But the wrong column number is passed in to the callback.
The best advice I've been given ... Read the code.
-
14 May 2009 9:07 AM #512
I see, that I haven't checked. Anyway, I wouldn't rely on col but on action argument. There is something strange in GridView code - I'm going to file a bug report.
EDIT: I've clarified it myself.Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
14 May 2009 9:24 AM #513
Try it now.
Explanation: The problem is that RowActions are used as Column before they are initialized in Ext 3 so id doesn't exist yet when ColumnModel runs. I've used brute force to put RowActions column to lookup variable.Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
14 May 2009 10:19 AM #514
Hi jsakalos,
I've started using your RowActions extension, and i have a question about
hideMode.
I am trying to achive the following, and i am not quite understand how this hideMode works:
I have a grid, each row got some column with combo box, and i want when some values in the combo are selected to display the actions and sometimes not.
How can i trigger the hideMode thingy on runtime per row?
Thanks, your extension is great
-
14 May 2009 10:34 AM #515
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
14 May 2009 11:23 PM #516
Ohh ok, thanks.
One more question, maybe you stumbled already upon this and will have a clue for me.
when i click on the action icon i get "ed is undefined" in firebug.
On line:
var ed = this.colModel.getCellEditor(col, row);
if(!ed.rendered){
Any idea what i did wrong with RowActions?
-
14 May 2009 11:33 PM #517
This doesn't look like RowActions problem. I see it first time and RowActions do not do anything with editor.
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
21 May 2009 10:24 AM #518
Regex issue
Regex issue
I've implemented RowActions within my app but have come across an issue with how it performs the row lookup when the user clicks a button at the grouping level. If the field you're grouping by contains a non-alphanumeric character (specifically, parenthesis), the store lookup cannot find the row. The problem I found is within the below snippet from the RowAction code:
groupId contains the contents of the field you're grouping on. If that text contains parens, a proper regex isnt created when performing the call to new RegExp(groupId) - as a result the groupId.match call fails. A quick fix for this would be to escape the text using Ext.escapeRe() function, for example:Code:if(groupId) { var re = new RegExp(groupId); records = this.grid.store.queryBy(function(r) { return r._groupId.match(re); }); records = records ? records.items : []; }
This seems to work nicely and prevents any special characters from creating an incorrect regex. Could this be fixed in the next release? For now I guess I could override the click method and apply this fix within my app.Code:if(groupId) { var re = new RegExp(Ext.escapeRe(groupId)); records = this.grid.store.queryBy(function(r) { return r._groupId.match(re); }); records = records ? records.items : []; }
Thanks,
Fred
-
21 May 2009 11:27 AM #519
http://extjs.eu/docs/?class=RegExp
BTW, having non-alphanumeric characters in field names in generally not good idea.Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
21 May 2009 12:35 PM #520
Not sure I follow...
Not sure I follow...
The non-alphanumeric data is not part of the field name, its contained within the content of the field itself.
For example, in my grid I have a column called "Category". For that field in row A, the text content is "widgets (new)". In row B, the content is "widgets (old)". I set the grouping in the grid to group on the "Category" column and based on the data I described, it would yield two groupings. When I click on the button next to "Widgets (new)", the data contained in the groupId field looks like "Category-widgets (new)" - so a concat of the column name and the content itself as a result of these prior 2 lines:
So it appears that even if you exclude special characters from your field name, the regex match may still break if your field content contains them.Code:var group = view.findGroup(target); var groupId = group ? group.id.replace(/ext-gen[0-9]+-gp-/, '') : null;


Reply With Quote