Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by C. Bernstein on Apr 01, 2009 06:18
open dhtmlx forum
Sorting Columns In Grid

When I initialize a simple test grid, I am calling grid.setColSorting(str) and the page loads fine. But when I left click on the column I get a javascript error: Object doesn't support this property or method. What exactly happens when the column is clicked? Which function does it go to? How can I go about finding why this javascript error is occuring?
Answer posted by dhxSupport on Apr 01, 2009 06:56
When you are clicking on the header to sort grid "onBeforeSorting" even fired which availible in PRO version. You can use error console of FireFox to detect wich row in your JavaScrip code returns such error. If issue still occurs please send us any kind of sample.
Answer posted by C. Bernstein on Apr 01, 2009 07:41
I am using Internet Explorer.  I have attached a zip files and am running searchChava.html.
Attachments (1)
sort.zip98.33 Kb
Answer posted by C. Bernstein on Apr 01, 2009 09:37
When I put in a stub function for onBeforeSorting() I am not getting the javascript error.  Can you verify that my version of dhtmlxgird.js is the correct one?  I have attached it.  We have the professional edition.
Attachments (1)
dhtmlxgrid.js102.04 Kb
Answer posted by dhxSupport on Apr 02, 2009 06:02

Such error happens because of conflict functions names. You have created custom function which called Number() (file appCore.js line 325). Number - is reserved word in JavaScript.This function convert  the value of an object to a number. Please see full list of the JavaScript reserved words here http://www.javascripter.net/faq/reserved.htm