Move a control from cell to cell

I have a custom control, but for this question let's keep it simple and use a "button". 

Without deleting the old button and creating a new button, I would like to "move" it's location from a cell in one table, to a cell in a completely different table.

Any ideas?

Doing "getElementById" to find the id of the control, and then "appendChild" to the cell gives me an "invalid pointer" error.  So obviously it doesnt want the same control pointed to twice on the page.

 

0
lupison
7/29/2008 4:29:57 PM
asp.net.client-side 24353 articles. 1 followers. Follow

1 Replies
682 Views

Similar Articles

[PageSpeed] 57

You can try the following. This might not be an correct solution, but still it works.

Access the cell where the button is there, and get its innerHTML and store it in local variable and clear the innerHTML for that cell.

Access the cell where the button is to be placed, and put the locally stored innerHTML value.

The below script gives idea.

var OldInnerHTML = OldCell.innerHTML;
OldCell.innerHTML = "";
NewCell.innerHTML = ""+OldInnerHTML;
  
Rajganesh
__________________________________________________
My Blog
If this post answers your question please mark it as Answered.
0
Rajganesh
7/30/2008 5:11:43 AM
Reply:

Similar Artilces:

Jscript, moving from client-side to server-side (.NET)
Hey all I’m working translating a web-app written in client-side Jscript to run on the server-side as JScript.NET. Without needing to get too specific, I am using Jscript because the original page aggregated raw data to produce statistical results (this was done dynamically based on user 'sort-by' options). The final output is an html report that can be emailed. Because this is currently being done on the client side, as the raw data grows the load-time grows as well (to the point that has almost become unusable). I’m posting here to see if anyone has any experi...

Validation Controls in .NET ( Client side or server side?)
 i have a very basic question. We have all these validation controls in asp.net ( required field, range validator and others)..my question is the required field validator is a server side control. So does that mean that it does a post back?..is it client side or server side control  The only controls that post back are buttons and other inputs where you set AutoPostback="True", such as a dropdownlist or a textbox.  Another way of posting back is using an UpdatePanel and placing a trigger in it for a specified control and/or event. All controls are considered clien...

What is the difference between e.Item.Cells[1].Controls[0] and e.Item.Cells[1].Controls[1] ?
I usually work with Datagrid but I do not understand the difference between ...Controls[0] & Controls[1] in DataGrid. Please give some suggestion ! Thanks a lot ! briefly a DataGrid is rendered as an HTML Table containing TR ( item ) and TD ( cells ) elements at runtime e.Item.Cells refer to the TableCellCollection in the current row this cells collection, like any collection in .NET, is zero-based, meaning the first cell in the Cells collection is Cells [ 0 ], and the next is Cells [ 1 ], etc. e.Item.Cells [ x ].Controls refer to the control collection within the cell. Thi...

What are diff Server-side control and Client-side control ?
What are diff Server-side control and Client-side control ? and diff server -side coding and client -side coding ? please help I have answered the first part of your question in your previous posting. Server-side coding languages are ASP, ASP.NET, PHP, CGI (Perl) and many, many more. They are used to create dynamic web content (based on additional information that is attached to the request) and are often used to extract information from databases. Client-side coding languages are JavaScript, VBScript, EMACScript and are used to create dynamic content that responds to the u...

Combining a server-side control with a client-side control!
Hi all, I am trying to combine a server-side control with a client-side control. I have created a listbox in both sides, the client-side control's code is: <select size="4" name="lstFruit" id="Select1" ondblclick="lst_dblClick" visible="false"> <option value="Banana">Banana</option> <option value="Apple">Apple</option> <option value="Mango">Mango</option> <option value="Orange">Orange</option> </select> The other one is the server-side control which has this code:   I wanted to add the ondblClick attribute to the se...

Edit the cell text by clicking in the cell in datagrid control
Sir,In asp.net 2.0 application, I want to edit the cell text by clicking in the cell in datagrid control. By EditItemTemplate it is possible to edit the cell text but for that we need to click on Edit button and after edit we need to click on Update button. But this way is not accepted. Is it possible in datagrid (possibly without activex control) to click in cell and edit the value and click out of the cell to update just like windows application grid?I did not find any article on web related to this.Please help me.Thanks in advance.    &nbs...

Menu Control in side item templete in side GridView insdie Update Panel error = 0.cells is null or not an object
Dear Team i am unsing ASP.NET 2.0 JavaScript C# Ajaxi am having an updatepanel and in side it i have a gridview with an item templete MenuControl, this menu when i click on any item it open a new popup when i close it and try to use the menu again i have a javascript error, 0.cells is null or not an objectplease advise what to do it is more than urgent. thank you...

Menu Control in side item templete in side GridView insdie Update Panel error = 0.cells is null or not an object
Dear Team i am unsing ASP.NET 2.0 JavaScript C# Ajaxi am having an updatepanel and in side it i have a gridview with an item templete MenuControl, this menu when i click on any item it open a new popup when i close it and try to use the menu again i have a javascript error, 0.cells is null or not an objectplease advise what to do it is more than urgent. thank you...

List of client side function of extenders and controls for client side
Hello All,I am using AJAX control toolkit for my current project. Now I need to find out what client side functions I can call on an extender. Lets say I am using a PopControlExtender. Now I want to show the popup from a JS funtions.If I can do a guess then it would be something like this$find('ppce').show();From where I can find what client side functions I can call on those extensders. This is really a frusterating thing. I learn about extenders only from Learn tutorials, no help here and there. Can anybody please tell me where are documentations about all the extenders in the tool...

moving server controls on the client side
I have a div wrapped round an update panel with a repeater in its content template. If I move the div using the following: element.appendChild(document.getElementById("divID")); the update panel and repeater still work fine with IE. If I do the same in Safari, the repeater will no longer re-draw, although the update panel does fire a postback and the item data bound method doesn't fall over. Any ideas why this would be breaking in Safari?...

Accessing gridview cell from client side.
Hi, I'm having problems accesing a value in a gridview from client-side. I'm learning javascript and I'm not familiar with all the methods... The value is in a TextBox contained in my gridView cell. I've tried several thing and the value returned is always undefined apart when I use this:  var selRow = getSelectedRow(rowIndex); var textBox = document.getElementById('<%=txtUserID.ClientID %>'); selRow.style.background = '#005288'; document.getElementById('<%=txtUserID.ClientID %>').value = selRow.cells[4].innerHT...

Client side access of a cell in a datagrid
I have a datagrid on my page. One column contains a button that on the server I can disable with the following (where dgi is the DataGridItem for a particular row in the grid): dgi.Cells[9].Enabled=false; I have code on the client side that brings up a modal dialog. Depending on the response from the modal dialog, I may need to change the enable of the button on that row. Is there a way to access the cell on the client like I am doing on the server? I would prefer to not round trip to the server to accomplish this. Thanks -- Jean.Jean Hello, i want to recommend t...

How to add first cell as emty cell to row in table server control
Hi all ,   i have diveded Table row into 28 cells Programmatically  . 0 to 28  but i have to made first cell as emty cell and from second cell i want to start assiging values i mean from 0 to 28   Here my question is how i made first cell as emty cell and from secnod one i assign the value 0 to 28? give me hint please.   Best Regards Rameezwaheed life is name of learning!Mark as an answer if it helps if you would like to make this an empty cell then set the value equal to &nbsp;  Try This<table><tr><td>&nbsp;</td><td...

Is there a correspondance for each server side control to be equivalent to a client side html control
Where can find the list and can use that equivalence and what is its usage plsThanksThanks a lot, I appreciate your taking the time to help me. What exactly do you mean? A correspondence of what?All controls have a ClientID property, which for most controls tells the DOM element ID that will be used in the HTML rendering. Aside from that certain controls might offer additional client-side functionality, but there's no one standard.Thanks,EilonBlog: http://weblogs.asp.net/LeftSlipper/ I mean. When I am using html control in my aspx page like:  <input type=text ..>  and...

Web resources about - Move a control from cell to cell - asp.net.client-side

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

‘Enough Is Enough’: Obama Demands More Gun Control After Colorado Shooting
President Obama again turned to gun control as a potential solution to the horrific act

Obama pushes for gun control after Colorado shooting
"This is not normal," president says after gunman fatally shoots three people, including police officer, at Planned Parenthood facility

DC Police Chief, “If you’re in a position to try and take the gunman down…it’s the best option for saving ...
... in a position to try and take the gunman down…it’s the best option for saving lives before police can get there,” Yet DC Supports Gun Control ...

The Legend of Zelda: Twilight Princess Wii U will likely support Wiimote and Nunchuk controls
Well this is interesting. Fans have been speculating as to the control schemes that will be supported in The Legend of Zelda: Twilight Princess ...

Mind-Control Bacteria Stop You From Eating Too Much
Gut microbes release proteins that stop the brain from thinking you're still hungry.

Control Your HTPC With Scavenged IR Parts
If you’ve built yourself a home theater PC, one of your highest priorities is probably coming up with a convenient control solution. The easiest ...

ICYMI: Even the AP couldn’t validate any of Hillary’s gun control nonsense
... – not 200 as she claimed . Asked to explain the discrepancy, Clinton’s campaign pointed to 2013 statistics from the Centers for Disease Control ...

Over-The-Counter Birth Control Empowers Women And Pharmacists In Oregon And California
Over-the-counter birth control is coming to Oregon and California. There’s an enactment of new laws on the horizon that will allow pharmacists ...

Women in California and Oregon Will be Able to Get Birth Control Directly From Pharmacists
... new laws in California and Oregon will allow women to forgo with a visit to the gynecologist in order to obtain a prescription for birth control. ...

Resources last updated: 11/29/2015 4:45:50 AM