Question : how to hide/ view columns in a gridview using checkboxes in CustomEditorpart in sharepoint

I want to hide/view columns according to the selected checkbox value in CustomEditorPart for the gridview webpart in Sharepoint?

Answer : how to hide/ view columns in a gridview using checkboxes in CustomEditorpart in sharepoint

No body will be able to answer this question without seeing the HTML output... but in a nutshell using javascript you loop through your table rows setting the style.display of a cell to none.

like

 for (var r=0; row<tablerows.length;row++) {
      rows[row].Cell[5].style.display='none';
    }


This should hide the 5th index cell in each row of a table or hide the 6th column.

=========================================================

Or using server side code have a checkbox that does a postback removing the column.
Random Solutions  
 
programming4us programming4us