Free Support Forum -

Search and High light a text passed from our main page while loading the preview


I have problem that, i want to search and highlight a text passed from our main page to the document viewer while loading the page…

i tried to call ‘triggerSearchEvent’ function defined inside ‘searchViewModel.prototype’ but the issue found that this.Element.trigger is not defined…

searchViewModel.prototype.triggerSearchEvent(false, false, undefined, false);

also i tried to invoke the ‘keypress’ event defined inside the ‘search textbox’ but this also failed…

var e = jQuery.Event(“keypress”);
e.keyCode = 13; // # Some key code value

how can i solve this problem…
please help me…

Hi there,

Thanks for using GroupDocs.Viewer for .NET API. Please tell us the API version and Showcase project you are using so that we can further investigate your issue.


Showcase :ASP.NET_MVC_Front_End

.Net Framework 4.5

Hi there,

Thanks for providing the details. We are currently invetsigating your issue and in case we require any further details, we’ll get back to you.

Thanks for your cooperation.

Warm Regards

Hi there,

We are happy to inform you that your requested feature logged in GitHub issues as has been implemented. You can use searchText JavaScript parameter in index.cshtml page i-e searchText: “demo”. Please download the latest source code from the GitHub repository.

Warm Regards