Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8840259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:25:32+00:00 2026-06-14T10:25:32+00:00

I made a listbox by table because I needed two column to show list.

  • 0

I made a listbox by table because I needed two column to show list.
and, I am trying to edit the text in the table when I hit the listbox.
I mean the selected list is changed to something like edtitable box when I click a list, so I can edit the text directly without putting a text on the other box that comes up.
Is there a way to do this??

here is the code for the listbox:

$(document).ready(function () {
   $('div#selReporterList table tr:has(td)').click(function() {
     $('.selected').removeClass('selected');
     $('.selected').addClass('deselected');
     $(this).addClass('selected'); 
   });  
});

the table is here:

<div id="selReporterList" class="srList">
  <div>
    <table id="list" cellspacing="0" border="1" style="border-collapse:collapse;" ndblclick="edit()">
      <tr>
        <td id="a" class="1" value="apple">apple</td>
        <td id="b" class="2" value="good">good</td>
      </tr>
      <tr>
        <td id="a" class="1" value="banana">banana</td>
        <td id="b"class="2" value="very good">very good</td>
      </tr>
    </tr>
    </table>
  </div>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:25:33+00:00Added an answer on June 14, 2026 at 10:25 am
        <div id="selReporterList" class="srList">
            <div>
                <table id="list" cellspacing="0" border="1" onclick="changeTableModeToEdit(true)" ondblclick="changeTableModeToEdit(false)" style="border-collapse:collapse;" ndblclick="edit()">
                    <tr>
                        <td id="a" class="1" value="apple"><span>apple</span></td>
                        <td id="b" class="2" value="good"><span>good</span></td>
                    </tr>
                    <tr>
                        <td id="a" class="1" value="banana"><span>banana</span></td>
                        <td id="b"class="2" value="very good"><span>very good</span></td>
                    </tr>
                </tr>
            </table>
        </div>
    
        <script type="text/javascript">
            function changeTableModeToEdit(toEditMode){
                var value;
                if(toEditMode)
                {
                    $('#list span').each(function(){
                        value = $(this).text();
                        $(this).after('<input type="text"/>');
                        $(this).next().val(value).focus();          
                        $(this).remove();
                    });
                }
                else
                {
                    $('#list input').each(function(){
                        value = $(this).val();
                        $(this).after('<span> </span>');
                        $(this).next().text(value);         
                        $(this).remove();
                    });
                }
            }
        </script>       
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently i have made a bar chart from a listbox from this example: http://weblogs.thinktecture.com/cnagel/2011/06/wpf-listbox-as-bar-chart.html
I made a UITableViewCell and I have 20 rows in that table in which
I'm using a controlTemplate of the ListBox to show a collection. I want to
I made a ListBox with your standard smart-control thing, and have it connected to
I have a ListBox which is made up of Grid Items in Multiple SelectionMode
I am making a custom Listbox (for the compact framework). I have made an
I have a listbox on my website, which contains some elements. I made the
I've made a javascript to make a list of values for a list box.
i have made a listbox datatemplated with button and binded to a textbox. i
Hi I have made checked List Box in WPF but the binding is not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.