The first time pages load, I create a RadGrid (OnInit) and I set the columns width. When I do a web service request, the following method is executed after that request:
The problem is after the masterTable.dataBind(), the columns width are changing. Is there a way to keep the columns settings?
Thanks.
| function OnSuccessfullyWebServiceRequest(res){ |
| var grid = GetGrid(); |
| if (res){ |
| var masterTable = grid.get_masterTableView(); |
| var columns = masterTable.get_columns(); |
| for(var i = 0; i<columns.length; i++){ |
| var columnName = columns[i].get_uniqueName(); |
| if (res.indexOf(columnName) < 0){ |
| columns[i].set_visible(false); |
| } |
| else{ |
| columns[i].set_visible(true); |
| } |
| } |
| masterTable.dataBind(); |
| } |
| } |
The problem is after the masterTable.dataBind(), the columns width are changing. Is there a way to keep the columns settings?
Thanks.