Hi all,
My requirement was to search a text the user gives inside the Grid and select that particular row. The user can also do find next in the grid. I was able to identify all the rows in which that particular text is there. And I am able to select each row as well and show it to the end user. But the problem is, it is a hierarchy grid. So assume that the row is present in the second level of grid. Then the row gets highlighted. But the second level is not expanded. The user has to expand and find out where the text is. Instead of this, is there any alternative approach that I can take.
Sample Code:
$.each(($("#ctl00_ContentPlaceHolder_SpreadSheet1").find(":contains('EXPNUM CHICKEN BRST AIRLINE CUT')")), function () {
if ((this.nodeName == "TR") && (($(this).is('.rgRow')) || ($(this).is('.rgAltRow')))) {
$find("ctl00_ContentPlaceHolder_SpreadSheet1")._spreadSheet().searchResults.push(this);
this.focus();
this._selected = true;
this.click();
this.setActive = true;
}
($("#ctl00_ContentPlaceHolder_SpreadSheet1").find(":contains('EXPNUM CHICKEN BRST AIRLINE CUT')"))
The above statement gives me all the results in an array. From that array, I am trying to filter only the rows and raising the click event. But the parent level of that particular row has to get expanded. So that the user can see the highlighted row.
Regards,
Meenakshi Sekar.
My requirement was to search a text the user gives inside the Grid and select that particular row. The user can also do find next in the grid. I was able to identify all the rows in which that particular text is there. And I am able to select each row as well and show it to the end user. But the problem is, it is a hierarchy grid. So assume that the row is present in the second level of grid. Then the row gets highlighted. But the second level is not expanded. The user has to expand and find out where the text is. Instead of this, is there any alternative approach that I can take.
Sample Code:
$.each(($("#ctl00_ContentPlaceHolder_SpreadSheet1").find(":contains('EXPNUM CHICKEN BRST AIRLINE CUT')")), function () {
if ((this.nodeName == "TR") && (($(this).is('.rgRow')) || ($(this).is('.rgAltRow')))) {
$find("ctl00_ContentPlaceHolder_SpreadSheet1")._spreadSheet().searchResults.push(this);
this.focus();
this._selected = true;
this.click();
this.setActive = true;
}
($("#ctl00_ContentPlaceHolder_SpreadSheet1").find(":contains('EXPNUM CHICKEN BRST AIRLINE CUT')"))
The above statement gives me all the results in an array. From that array, I am trying to filter only the rows and raising the click event. But the parent level of that particular row has to get expanded. So that the user can see the highlighted row.
Regards,
Meenakshi Sekar.