This is a migrated thread and some comments may be shown as answers.

IE7 Javascript error with

1 Answer 46 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 24 Oct 2012, 03:55 PM
I've got a the below javascript function that's called from OnGridCreated event handler. Everything works fine in Chrome, IE8 and IE9 browsers but I'm getting a javascript error in IE7 on the masterTableView.showColumn(columnIndex) or on  masterTableView.hideColumn(columnIndex). 

function toogleColumnDisplay(masterTableView, columnUniqueName, isDisplayed) {
    var column = masterTableView.getColumnByUniqueName(columnUniqueName);
    var columnIndex = column.get_element().cellIndex;
    if (isDisplayed) {
        masterTableView.showColumn(columnIndex);
    }
    else {
        masterTableView.hideColumn(columnIndex);
    }
}

It seems the IE7 error occures when a column is already hidden, and you're trying to use hideColumn on it. Also, if a column is visible  showColumn will produce an error. As a work around, I tried to check the column visibility before trying to change visibility.
 if (isDisplayed == column.get_visible()) {
        return;
    }

However, even though column's get_visible()  method returns an appropriate value after showColumn or hideColumn methods, the actual visibility of columns on the screen is not changed. It seems like the columns are not added to this._hiddenCols collection. 

Thanks,
Alex

1 Answer, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 26 Oct 2012, 03:24 PM
Hi Alex,

This was a known bug in the 2012 Q2 release and it was fixed in the 2012 Q3 release.
Please upgrade to the latest version to resolve the problem.
If you still have any issues using the Q3 2012 please try to insulate them into sample project and send it to us for further investigations.

Regards,
Angel Petrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question
or