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

Want to open up an entire column for editing

1 Answer 23 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rebecca Peltz
Top achievements
Rank 1
Rebecca Peltz asked on 11 Jun 2010, 12:15 AM
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>?

 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(); 
            } 
        } 

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 16 Jun 2010, 07:11 AM
Hello Rebecca,

To see more information along the lines of the requested functionality, please refer to the following example:

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx

I hope this gets you started properly.

All the best,
Yavor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Rebecca Peltz
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or