:: Forum >>

Patch: Disable/Enable Resizing and Sorting

In addition to clarifying the sorting functionality, I have added the following "methods" to grid.js:

1) isSortable( [0/1] );
2) isResizeable( [0/1] );

I would be happy to share this with you for potential inclusion, however, I need to know to whom to email the code. Please contact me directly at talgolanATyahoo.com.
Monday, November 17, 2003
(re-posted with corrected format)

I would be happy to publish patches or additional classes regardless of whether I decide to include them into the core libraries or not. It would be very nice to have the patches in a form, which can be easily applied on top of the core libraries (at run time). Otherwise with each release one would need to edit the source and apply the changes again. Here is the format I want to suggest:

1. create a separate script file (for example: mypatch.js)

2. create a patch method of the class you want to modify:

Active.Controls.Grid.patch = function(){
var obj = this.prototype;

// put your code inside, like this:

obj.sort = function(index){
// modified sort function


The last line executes the patch, i.e. replaces the original methods with your version.

3. include some description and how people can contact you (in comments)

4. would be nice to include test/example as well

5. send the patch to support/at/activewidgets.com and I will publish/include it to the distribution.

Anyone who wants to use the patch will simply add the new script block to the page after the core libraries:

<script src="../../runtime/activeui.js"></script>
<script src="../../patches/mypatch.js"></script>

Alex (ActiveWidgets)
Alex (ActiveWidgets)
Tuesday, November 18, 2003

I cannot refer to the line below. I got an error saying "Object doesn't support this property or method."


Please advice.

Thursday, March 4, 2004
This comes from a contributed patch. You can find it in /patches/sorting1.js. It was done quite some time ago, I don't know if it still works with the latest versions.
Alex (ActiveWidgets)
Thursday, March 4, 2004

This topic is archived.

Back to support forum

Forum search