I am building on the radgrid batch update code. Instead of double clicking on a cell and then unhiding an editable tag, in my case turn off a label and turn on a drop down list, I want to get a whole column and then unhide every cell in the column.
I'm looking at this property to get the collection of columns:
grid.MasterTableView.ColGroup.Cols
If I have this collection of columns and I iterate though it will I be able to access the cell that contains the tags that I want to manipulate.
In other words will this get me a collection of editable cells that I can manipulate with the following code where 'editedCell' represents one of the a cell that contains a label <span> and a dropdownlist <select>?
I'm looking at this property to get the collection of columns:
grid.MasterTableView.ColGroup.Cols
If I have this collection of columns and I iterate though it will I be able to access the cell that contains the tags that I want to manipulate.
In other words will this get me a collection of editable cells that I can manipulate with the following code where 'editedCell' represents one of the a cell that contains a label <span> and a dropdownlist <select>?
function ShowColumnEditor() { |
editedCell = this; |
//hide text and show column editor in the edited cell |
var cellText = this.getElementsByTagName("span")[0]; |
if (cellText) { |
cellText.style.display = "none"; |
//display the span which wrapps the hidden checkbox editor |
if (this.getElementsByTagName("span")[1]) { |
this.getElementsByTagName("span")[1].style.display = ""; |
} |
var colEditor = this.getElementsByTagName("input")[0] || this.getElementsByTagName("select")[0]; |
//if the column editor is a form decorated select dropdown, show it instead of the original |
if (colEditor.className == "rfdRealInput" && colEditor.tagName.toLowerCase() == "select") { |
colEditor = Telerik.Web.UI.RadFormDecorator.getDecoratedElement(colEditor); |
} |
colEditor.style.display = ""; |
colEditor.focus(); |
} |
} |