rakesh gupta
rakesh gupta

Reputation: 33

check a value is exist into jqgrid column or not

I need to check some value is exist into jQgrid's column or not . that value will come from some other input text will not come from grid cell. I need a function to check it.I'm not talking about the existing filtering functionality of jqgrid. enter image description here

As Shown Above I need to check 50020000 is exist in that particular column of not. Please Help.

Upvotes: 0

Views: 2594

Answers (1)

Ibrahim Khan
Ibrahim Khan

Reputation: 20750

You can get all row data from grid like following.

var allData = $('#grid').jqGrid('getGridParam', 'data');

The you can loop through these data and check for your data is exist or not.

$.each(allData, function(i, item){  
    if (item.row1 == text) { //do something }
    if (item.row2 == text) { //do something }
    if (item.row3 == text) { //do something }

    // check for more rows.......    
});

Take a look to this fiddle. Hope this will help you. http://jsfiddle.net/yNw3C/12271/

Upvotes: 1

Related Questions