Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

How to pass into an ajax call a field that is hidden in a grid

$
0
0

Hi,

I have a MVCContrib data grid, which displays columns with its data from a model that is defined/setup in the controller and called in the VIEW.

I have 5 fields that are being called in the MVCContrib grid. However one of the fields, (2nd second), i do not want the user to see. So, i had set that field to be 'Visible=false'

But, when im trying to use this field in my ajax call, it doesnt know it.

Here is my code for the ajax :

$('#grid tbody tr').on('hover', function () {$(this).toggleClass('clickable');
        }).on('click', function () {
            var self = this;$.ajax(
                    {
                        type: "POST",
                        url: "/Test/OtherTBHeaderTR",
                        data: { ID: $(this).find('td:eq(0)').text(),
                                taUserName: $(this).find('td:eq(1)').text(),
                                tBDate: $(this).find('td:eq(2)').text()
                        },
                        success: function (data) {$('#wrapper').html(data);$(self).off('click');
                        }
                    });
        });

Prior to adding the hidden field, all worked fine. But then, because i needed the field in the ajax call, i used it in my grid but as hidden. This doesnt work now, unfortunately. How do i go about getting the 2nd field in the grid ?

Thanks

Naren


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>