MVC JQUERY ROW field value

SSinhg 316 Reputation points
2022-06-21T10:52:42.777+00:00

Hi - I am using JqueryDatatables to display data on page.
How do I get value of a field inside row ?

Screengrab of what I tried

213320-untitled.png

Developer technologies ASP.NET Other
Developer technologies C#
{count} votes

Accepted answer
  1. AgaveJoe 30,126 Reputation points
    2022-06-21T17:35:36.64+00:00

    You have to understand that it is impossible to suggest an accurate solution when you do not provide all the information. Especially when you do not provide the HTML and property names. The screenshot looks like the property name has a space; "P Action". If there is a space then the syntax is...

    var TFQ = row["P Action"]  
    

    The screenshot also shows a space in front of Required; " Required".

    Lastly, .val() is used to get the value of an input element. Are you trying to grab the value of an input or the row data?

    If there are no spaces in the property name or value then the syntax is...

        if(row.PropertyName == "SomeValue") {   
           //Do something  
        }  
      
    
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.