Avatar of Michael Sterling
Michael Sterling
Flag for United States of America asked on

How do I access a column, or cell's data of my jQuery datatable?

I've got a jQuery datatable populated and have added a link in one of the columns to take the user to a different page for data processing. I need to pass the value of a particular column (cell) in the row. How do I do this? (see attatched code below)

        $(document).ready(function () {
            $.ajax({
                "url": "SignInGrid.aspx/getData",
                "type": "POST",
                "contentType": "application/json; charset=utf-8",
                "dataType": "json",
                "success": function (json) {
                    $('#example').DataTable({
                        "columns": [
                            {
                                "targets": 0,
                                "data": "DEALERID",
                                //"render": function (data, type, full, meta, oData) {
                                //    return '<a href="Contact.aspx?dealerid=' + data + '">' + data + '</a>';
                                "url": "Default.aspx/doLinkStuff"
                                //}
                            },
                            { "data": "EMAIL" },
                            { "data": "FIRSTNAME" },
                            { "data": "LASTNAME" },
                            { "data": "COMPANY" },
                            { "data": "CITY" },
                            { "data": "STATE" },
                            { "data": "ZIP" },
                            { "data": "BRANCH" },
                            {
                                "data": null,
                                "className": "center",
                                "render": function (data, type, full, meta, oData) {
                                    return '<a href="EditTimeRecord.aspx?timerecordid=' + data[0] +
                                    '&edit=y" class="editor_edit">Edit</a> / <a href="EditTimeRecord.aspx?timerecordid=' + data[0] +
                                    '&delete=y" class="editor_remove">Delete</a>'
                                }
                            }
                        ],
                        "aaData": $.parseJSON(json.d)
                    });
                }
            });
        });

Open in new window

.NET ProgrammingASP.NETC#jQueryAJAX

Avatar of undefined
Last Comment
Michael Sterling

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Michael Sterling

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Michael Sterling

ASKER
just continued to research it, and took a "whisp" at it.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy