Click here to Skip to main content
15,893,663 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
change Column Order using single click of button

For ex.

if My COlumn

HTML
<TABLE border=1>
  <TR>
	<TD>A</TD>
	<TD>B</TD>
  </TR>
  <TR>
	<TD>33</TD>
	<TD>36</TD>
  </TR>
  </TABLE>


and I want to change like

HTML
<TABLE border 1>
 <TR>
   <TD>B</TD>
   <TD>A</TD>
 </TR>
 <TR>
   <TD>36</TD>
   <TD>33</TD>
 </TR>
 </TABLE>


On single click of button how can I do

Please Help me.

Thank you in advance

What I have tried:

I tried but Result 0 please help me.
Posted

1 solution

A quick google search has several options. See this post for a few, javascript - Change table columns order - Stack Overflow[^]
 
Share this answer
 
Comments
hareshdgr8 16-Feb-16 8:01am    
sir I don't want drag and drop I want if I click on button then 2nd column apper 1 and 1st column apper on 2nd side.

Thank you for trying to resolve my problem
ZurdoDev 16-Feb-16 8:03am    
OK. That code will still work. Where are you stuck? No one will do everything for you. I practically handed it all to you, not make it work in your code.
hareshdgr8 16-Feb-16 8:04am    
okey sir ill check and reply you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900