MVC JQUERY ROW field value

SSinhg 286 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

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,254 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,249 questions
{count} votes

Accepted answer
  1. AgaveJoe 26,201 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