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 7017347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:54:09+00:00 2026-05-27T22:54:09+00:00

When user clicks row I want to display data in inputs so it is

  • 0

When user clicks row I want to display data in inputs so it is editable (don’t want editing in table)

Here is the code:
http://jsfiddle.net/APzK8/

Like you can see two inputs work and two don’t. I’d prefer to have only Selected property in ViewModel. In real code every Config will have 15-20 properties.

Also if you could help me selecting first Config on page load. I can click the row with javascript but it is ugly. I think it should be defined in viewmodel. Tried many things but nothing worked.

  • 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-05-27T22:54:09+00:00Added an answer on May 27, 2026 at 10:54 pm

    Basically, you would need to access the values by doing Selected().Name rather than Selected.Name. So, you want to get the underlying value of selected and then access its Name property.

    However, an easier/better way to do this is to use the with control-flow binding, which will protect you against null values (avoid having to write Selected() ? Selected().Name : null kind of statements).

    It would look like:

    <div data-bind="with: Selected">
            <label for="name">Selected.Name</label>
            <input type="text" id="name" data-bind="value: Name" />
            <label for="value">Selected.Value</label>
            <input type="text" id="value" data-bind="value: Value" />
            <input type="button" data-bind="click: $root.AddConfig" value="Add config" />
    </div>
    

    Here is a sample: http://jsfiddle.net/rniemeyer/APzK8/2/

    To select the first config, I just initialized Selected to the first value in Configs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using table layout to display data, but i want it to behave
When the user clicks on a row in the datagrid (or uses the keyboard),
When a user clicks a submit button I want the form to be submitted.
When the user clicks a button, I want his browser to automatically scroll to
Hey guys, I have an application that I want to display some data from
I have a clickable table row: $(#content-display).on('click', '#myTable tbody tr', function (){ foo(); });
I have a nested table arrangement for displaying data. I want the nested table
I am using DataTables to display row data, in the last column on the
I want to display a custom confirmation message box (ChildWindow) when the user selects
Please see the below code: I am have a table row defined using asp.net

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.